aboutsummaryrefslogtreecommitdiff
path: root/package/procps-ng/0001-remove-index.patch
blob: 1d85b31cb5c82d2e45511ed57e4a910612087169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sysctl: remove use of legacy index()

[yann.morin.1998@free.fr: adapt to procps-ng]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN procps-v3.3.9.orig/sysctl.c procps-v3.3.9/sysctl.c
--- procps-v3.3.9.orig/sysctl.c	2013-12-03 12:16:18.000000000 +0100
+++ procps-v3.3.9/sysctl.c	2014-05-31 00:45:00.869748741 +0200
@@ -794,7 +794,7 @@
 		      program_invocation_short_name);
 
 	for ( ; *argv; argv++) {
-		if (WriteMode || index(*argv, '='))
+		if (WriteMode || strchr(*argv, '='))
 			ReturnCode += WriteSetting(*argv);
 		else
 			ReturnCode += ReadSetting(*argv);