diff options
author | Anselm R. Garbe <arg@suckless.org> | 2007-02-09 14:56:19 +0100 |
---|---|---|
committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-09 14:56:19 +0100 |
commit | fd995dac78e34cc427abd7198af0db957a40664a (patch) | |
tree | 6338bdbe0ceef5c27ce13f136fc5ef5caecd497e /main.c | |
parent | e5765cdd844125f7044d316b710b9a5a55117557 (diff) | |
download | dwm-fd995dac78e34cc427abd7198af0db957a40664a.tar.gz |
pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |