Merge branch 'use-strchr' into 'master'
sysctl.c: use strchr() instead of index() index() is a legacy function, which is no longer implemented by all C libraries (example: uClibc). Instead, use the POSIX defined strchr() function. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> See merge request !22
This commit is contained in:
commit
45b14318cf
2
sysctl.c
2
sysctl.c
@ -816,7 +816,7 @@ int main(int argc, char *argv[])
|
|||||||
program_invocation_short_name);
|
program_invocation_short_name);
|
||||||
|
|
||||||
for ( ; *argv; argv++) {
|
for ( ; *argv; argv++) {
|
||||||
if (WriteMode || index(*argv, '='))
|
if (WriteMode || strchr(*argv, '='))
|
||||||
ReturnCode += WriteSetting(*argv);
|
ReturnCode += WriteSetting(*argv);
|
||||||
else
|
else
|
||||||
ReturnCode += ReadSetting(*argv);
|
ReturnCode += ReadSetting(*argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user