fix warning

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
This commit is contained in:
David du Colombier 2023-06-25 20:43:31 +02:00
parent 455972bcd4
commit c55871eab5
1 changed files with 1 additions and 1 deletions

View File

@ -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);