commit fabe215b4c92b8816a931ddffe4f0c8cc32f98a9
parent 285d27458fe2066e83bec4120fa808b57e2b8d8e
Author: Raymond Cole <rc@wolog.xyz>
Date: Tue, 5 Nov 2024 18:20:40 +0000
Fix uninitialized struct members
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/drw.c b/drw.c
@@ -67,6 +67,8 @@ drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
drw->gc = XCreateGC(dpy, root, 0, NULL);
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
+ drw->scheme = NULL;
+ drw->fonts = NULL;
return drw;
}
@@ -136,6 +138,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
font->pattern = pattern;
font->h = xfont->ascent + xfont->descent;
font->dpy = drw->dpy;
+ font->next = NULL;
return font;
}