all repos — dwm @ fd995dac78e34cc427abd7198af0db957a40664a

my dwm build

pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary
Anselm R. Garbe arg@suckless.org
Fri, 09 Feb 2007 14:56:19 +0100
commit

fd995dac78e34cc427abd7198af0db957a40664a

parent

e5765cdd844125f7044d316b710b9a5a55117557

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M main.cmain.c

@@ -273,7 +273,7 @@ readin = False;

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); }