summaryrefslogtreecommitdiff
path: root/procps/sysctl.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-03-27 05:02:00 +0100
committerDenys Vlasenko2010-03-27 05:02:00 +0100
commitc2fdd41f5f97349f23b2a66592b9b29834faabaf (patch)
tree1cca5a134a71b9fde5b1d42da4c7ad83fc63bb3b /procps/sysctl.c
parentfbedacfc8caa1ec8f14e664a881cb0a93c8f8712 (diff)
downloadbusybox-c2fdd41f5f97349f23b2a66592b9b29834faabaf.zip
busybox-c2fdd41f5f97349f23b2a66592b9b29834faabaf.tar.gz
sysctl: tiny code shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/sysctl.c')
-rw-r--r--procps/sysctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c
index c9063bf..7a5bf14 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -56,8 +56,7 @@ static void sysctl_dots_to_slashes(char *name)
*cptr = '\0';
//bb_error_msg("trying:'%s'", name);
if (access(name, F_OK) == 0) {
- if (cptr != end) /* prevent trailing '/' */
- *cptr = '/';
+ *cptr = '/';
//bb_error_msg("replaced:'%s'", name);
last_good = cptr;
goto again;