commit 87cb818ac027c000d491b01f9636c4a1a5e42b21
Author: sin <[email protected]>
Date:   Thu Apr 17 17:15:36 2014 +0100

    No need for a temporary variable in streplace()

diff --git a/sysctl.c b/sysctl.c
index eb656c7..290f917 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -10,11 +10,9 @@
 static void
 streplace(char *s, int a, int b)
 {
-       char *p;
-
-       for (p = s; *p; p++)
-               if (*p == a)
-                       *p = b;
+       for (; *s; s++)
+               if (*s == a)
+                       *s = b;
 }
 
 static int


Reply via email to