patch-support_nfs_nfs_mntent_c 911 B

1234567891011121314151617181920212223242526272829
  1. --- nfs-utils-1.2.1.orig/support/nfs/nfs_mntent.c 2009-11-04 12:13:56.000000000 +0100
  2. +++ nfs-utils-1.2.1/support/nfs/nfs_mntent.c 2009-12-25 19:33:24.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. @@ -163,7 +163,7 @@ nfs_getmntent (mntFILE *mfp) {
  11. return NULL;
  12. mfp->mntent_lineno++;
  13. - s = index (buf, '\n');
  14. + s = strchr (buf, '\n');
  15. if (s == NULL) {
  16. /* Missing final newline? Otherwise extremely */
  17. /* long line - assume file was corrupted */
  18. @@ -171,7 +171,7 @@ nfs_getmntent (mntFILE *mfp) {
  19. fprintf(stderr, _("[mntent]: warning: no final "
  20. "newline at the end of %s\n"),
  21. mfp->mntent_file);
  22. - s = index (buf, 0);
  23. + s = strchr (buf, 0);
  24. } else {
  25. mfp->mntent_errs = 1;
  26. goto err;