1
0

patch-mount_mntent_c 960 B

123456789101112131415161718192021222324252627282930
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- util-linux-2.12r.orig/mount/mntent.c 2004-10-13 22:57:34.000000000 +0200
  3. +++ util-linux-2.12r/mount/mntent.c 2008-10-16 12:00:45.000000000 +0200
  4. @@ -6,7 +6,7 @@
  5. */
  6. #include <stdio.h>
  7. -#include <string.h> /* for index */
  8. +#include <string.h> /* for strchr */
  9. #include <ctype.h> /* for isdigit */
  10. #include <sys/stat.h> /* for umask */
  11. #include "mntent.h"
  12. @@ -158,7 +158,7 @@ my_getmntent (mntFILE *mfp) {
  13. return NULL;
  14. mfp->mntent_lineno++;
  15. - s = index (buf, '\n');
  16. + s = strchr (buf, '\n');
  17. if (s == NULL) {
  18. /* Missing final newline? Otherwise extremely */
  19. /* long line - assume file was corrupted */
  20. @@ -166,7 +166,7 @@ my_getmntent (mntFILE *mfp) {
  21. fprintf(stderr, _("[mntent]: warning: no final "
  22. "newline at the end of %s\n"),
  23. mfp->mntent_file);
  24. - s = index (buf, 0);
  25. + s = strchr (buf, 0);
  26. } else {
  27. mfp->mntent_errs = 1;
  28. goto err;