sysctl: tiny code shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 27 Mar 2010 04:02:00 +0000 (05:02 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 27 Mar 2010 04:02:00 +0000 (05:02 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
procps/sysctl.c

index c9063bf07310041fe42039835023e62336778a10..7a5bf14358b160c9042c7799739786aadcceef51 100644 (file)
@@ -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;