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 | treating acroread and mplayer floating by default (diff) | |
| download | dwm-fd995dac78e34cc427abd7198af0db957a40664a.tar.gz dwm-fd995dac78e34cc427abd7198af0db957a40664a.zip | |
pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) - 1 is unnecessary
Diffstat (limited to '')
| -rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -273,7 +273,7 @@ main(int argc, char *argv[]) { | |||
| 273 | break; | 273 | break; |
| 274 | default: | 274 | default: |
| 275 | for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0'); | 275 | for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0'); |
| 276 | for(p = stext + strlen(stext) - 1; p >= stext && *p != '\n'; --p); | 276 | for(; p >= stext && *p != '\n'; --p); |
| 277 | if(p > stext) | 277 | if(p > stext) |
| 278 | strncpy(stext, p + 1, sizeof stext); | 278 | strncpy(stext, p + 1, sizeof stext); |
| 279 | } | 279 | } |
