From c55871eab5693060b2ca61fa412c12b433efedd1 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 25 Jun 2023 20:43:31 +0200 Subject: [PATCH] fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fixes the following warning: cmd/wmii/bar.c:149:20: warning: the comparison will always evaluate as ‘true’ for the address of ‘text’ will never be NULL --- cmd/wmii/bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/wmii/bar.c b/cmd/wmii/bar.c index 26bcbe5f..ccb511ba 100644 --- a/cmd/wmii/bar.c +++ b/cmd/wmii/bar.c @@ -146,7 +146,7 @@ bar_draw(WMScreen *s) { b->r.min = ZP; b->r.max.y = Dy(s->brect); b->r.max.x = (def.font->height & ~1) + def.font->pad.min.x + def.font->pad.max.x; - if(b->text && strlen(b->text)) + if(strlen(b->text)) b->r.max.x += textwidth(def.font, b->text); width += Dx(b->r); s->barwin_rgba += RGBA_P(b->colors);