From e0fa5c3700290c0b3aec65845588a77d310726eb Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Sun, 20 Sep 2020 11:47:27 +0530 Subject: [PATCH] Small improvement in updatestatus --- dwmblocks.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dwmblocks.c b/dwmblocks.c index b84abed..c2d0ab2 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -215,7 +215,7 @@ updatestatus() /* checking half of the function */ /* skip empty blocks */ - for (;;) { + for (;; current++) { if (!current->pathu) return 0; /* skip delimiter for the first non-empty block */ @@ -226,7 +226,6 @@ updatestatus() current++; goto update0; } - current++; } /* main loop */ for (; current->pathu; current++) { @@ -261,14 +260,13 @@ skipdelimc: update0: /* updating half of the function */ /* skip empty blocks */ - for (;;) { + for (;; current++) { if (!current->pathu) return 1; /* skip delimiter for the first non-empty block */ if (*current->cmdoutcur != '\n' && *current->cmdoutcur != '\0') goto skipdelimu; *current->cmdoutprv = *current->cmdoutcur; - current++; } update1: /* main loop */