X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=draw.c;h=362d025e65b6370424e86394ee30c981f5b048e5;hb=1c2d673ded697f4b131f8700ce98392fbb383b2e;hp=65a3d51823804b8e7cf510da8d699c6512a37303;hpb=cff951c65086950eeef5723b65dc06cbe7cdfa19;p=dwm.git diff --git a/draw.c b/draw.c index 65a3d51..362d025 100644 --- a/draw.c +++ b/draw.c @@ -80,7 +80,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool highlight) { /* extern */ void -drawall() { +drawall(void) { Client *c; for(c = clients; c; c = getnext(c->next)) @@ -89,7 +89,7 @@ drawall() { } void -drawstatus() { +drawstatus(void) { int i, x; dc.x = dc.y = 0; @@ -149,7 +149,8 @@ getcolor(const char *colstr) { Colormap cmap = DefaultColormap(dpy, screen); XColor color; - XAllocNamedColor(dpy, cmap, colstr, &color, &color); + if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color)) + eprint("error, cannot allocate color '%s'\n", colstr); return color.pixel; }