aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-09 14:56:19 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-09 14:56:19 +0100
commitfd995dac78e34cc427abd7198af0db957a40664a (patch)
tree6338bdbe0ceef5c27ce13f136fc5ef5caecd497e
parente5765cdd844125f7044d316b710b9a5a55117557 (diff)
downloaddwm-fd995dac78e34cc427abd7198af0db957a40664a.tar.gz
dwm-fd995dac78e34cc427abd7198af0db957a40664a.tar.bz2
dwm-fd995dac78e34cc427abd7198af0db957a40664a.zip
pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1fd7ab1..02475e0 100644
--- a/main.c
+++ b/main.c
@@ -273,7 +273,7 @@ main(int argc, char *argv[]) {
break;
default:
for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0');
- for(p = stext + strlen(stext) - 1; p >= stext && *p != '\n'; --p);
+ for(; p >= stext && *p != '\n'; --p);
if(p > stext)
strncpy(stext, p + 1, sizeof stext);
}