ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 87cb818ac027c000d491b01f9636c4a1a5e42b21
parent edc39cef27b442815f8541a7a3abc2a78b8f54ac
Author: sin <sin@2f30.org>
Date:   Thu, 17 Apr 2014 17:15:36 +0100

No need for a temporary variable in streplace()

Diffstat:
Msysctl.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 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