patch-support_nfs_nfs_mntent_c 951 B

1234567891011121314151617181920212223242526272829
  1. --- nfs-utils-1.2.5.orig/support/nfs/nfs_mntent.c 2011-09-24 13:55:15.000000000 +0200
  2. +++ nfs-utils-1.2.5/support/nfs/nfs_mntent.c 2012-02-27 17:39:34.000000000 +0100
  3. @@ -9,7 +9,7 @@
  4. */
  5. #include <stdio.h>
  6. -#include <string.h> /* for index */
  7. +#include <string.h> /* for strchr */
  8. #include <ctype.h> /* for isdigit */
  9. #include <sys/stat.h> /* for umask */
  10. #include <unistd.h> /* for ftruncate */
  11. @@ -172,7 +172,7 @@ nfs_getmntent (mntFILE *mfp) {
  12. return NULL;
  13. mfp->mntent_lineno++;
  14. - s = index (buf, '\n');
  15. + s = strchr (buf, '\n');
  16. if (s == NULL) {
  17. /* Missing final newline? Otherwise extremely */
  18. /* long line - assume file was corrupted */
  19. @@ -180,7 +180,7 @@ nfs_getmntent (mntFILE *mfp) {
  20. fprintf(stderr, _("[mntent]: warning: no final "
  21. "newline at the end of %s\n"),
  22. mfp->mntent_file);
  23. - s = index (buf, 0);
  24. + s = strchr (buf, 0);
  25. } else {
  26. mfp->mntent_errs = 1;
  27. goto err;