1
0

patch-support_nfs_nfs_mntent_c 961 B

123456789101112131415161718192021222324252627282930
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- nfs-utils-1.1.3.orig/support/nfs/nfs_mntent.c 2008-07-27 23:01:45.000000000 +0200
  3. +++ nfs-utils-1.1.3/support/nfs/nfs_mntent.c 2008-10-06 16:53:17.000000000 +0200
  4. @@ -9,7 +9,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. @@ -163,7 +163,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. @@ -171,7 +171,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;