From: Anselm R. Garbe Date: Sat, 3 Nov 2007 20:14:04 +0000 (+0100) Subject: doing it in a shorter way X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=260a55ef625466a5ba6c6c6ef736706df7b5d81b;p=dwm.git doing it in a shorter way --- diff --git a/dwm.c b/dwm.c index 044177d..1266e46 100644 --- a/dwm.c +++ b/dwm.c @@ -1321,10 +1321,8 @@ run(void) { *p = '\0'; offset = 0; } - else if(offset + r < len - 1) - offset += r; else - offset = 0; + offset = (offset + r < len - 1) ? offset + r : 0; } drawbar(); }