1
0

patch-sysctl_c 786 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- procps-3.2.7.orig/sysctl.c 2006-06-25 02:51:51.000000000 +0200
  3. +++ procps-3.2.7/sysctl.c 2008-10-16 13:47:28.000000000 +0200
  4. @@ -272,7 +272,7 @@ static int WriteSetting(const char *sett
  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. @@ -503,7 +503,7 @@ int main(int argc, char *argv[]) {
  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);