summaryrefslogtreecommitdiff
path: root/package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c
blob: 5097e0cf0a4f066b29ae16c9327337496140bc6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- nfs-utils-1.1.3.orig/support/nfs/nfs_mntent.c	2008-07-27 23:01:45.000000000 +0200
+++ nfs-utils-1.1.3/support/nfs/nfs_mntent.c	2008-10-06 16:53:17.000000000 +0200
@@ -9,7 +9,7 @@
  */
 
 #include <stdio.h>
-#include <string.h>		/* for index */
+#include <string.h>		/* for strchr */
 #include <ctype.h>		/* for isdigit */
 #include <sys/stat.h>		/* for umask */
 
@@ -163,7 +163,7 @@ nfs_getmntent (mntFILE *mfp) {
 			return NULL;
 
 		mfp->mntent_lineno++;
-		s = index (buf, '\n');
+		s = strchr (buf, '\n');
 		if (s == NULL) {
 			/* Missing final newline?  Otherwise extremely */
 			/* long line - assume file was corrupted */
@@ -171,7 +171,7 @@ nfs_getmntent (mntFILE *mfp) {
 				fprintf(stderr, _("[mntent]: warning: no final "
 					"newline at the end of %s\n"),
 					mfp->mntent_file);
-				s = index (buf, 0);
+				s = strchr (buf, 0);
 			} else {
 				mfp->mntent_errs = 1;
 				goto err;