procps-remove-index.patch 724 B

123456789101112131415161718192021
  1. diff -ur procps-3.2.5/sysctl.c procps-3.2.5-patched/sysctl.c
  2. --- procps-3.2.5/sysctl.c 2005-01-05 15:00:47.000000000 -0600
  3. +++ procps-3.2.5-patched/sysctl.c 2006-12-04 19:51:36.272843000 -0600
  4. @@ -272,7 +272,7 @@
  5. return 0;
  6. } /* end if */
  7. - equals = index(setting, '=');
  8. + equals = strchr(setting, '=');
  9. if (!equals) {
  10. fprintf(stderr, ERR_NO_EQUALS, setting);
  11. @@ -498,7 +498,7 @@
  12. if (NameOnly && Quiet) // nonsense
  13. return Usage(me);
  14. SwitchesAllowed = false;
  15. - if (WriteMode || index(*argv, '='))
  16. + if (WriteMode || strchr(*argv, '='))
  17. ReturnCode = WriteSetting(*argv);
  18. else
  19. ReturnCode = ReadSetting(*argv);