From 9c4a0a37d352e2dd8e78256921a5725e29907adc Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Sat, 25 Jul 2020 17:20:09 +0530 Subject: [PATCH] Reversed return value of updatestatus --- dwmblocks.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dwmblocks.c b/dwmblocks.c index 3405516..3f7f568 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -114,10 +114,10 @@ getcmd(Block *block, int sigval) void setroot() { - if (updatestatus()) /* only set root if block outputs have changed */ - return; - XStoreName(dpy, DefaultRootWindow(dpy), statusstr); - XFlush(dpy); + if (updatestatus()) { + XStoreName(dpy, DefaultRootWindow(dpy), statusstr); + XFlush(dpy); + } } void @@ -223,7 +223,7 @@ updatestatus() goto update2; str += delimlength; } - return 1; + return 0; update0: for (; current->pathu; current++) { if (EMPTYCMDOUT(current)) { @@ -247,7 +247,7 @@ update2: /* remove delimiter at the end if not all blocks are empty */ if (str != statusstr) *(str - delimlength) = '\0'; - return 0; + return 1; } void