diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-05-05 15:46:48 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-05-05 15:46:48 +0100 |
commit | 210b303941e517a9d7df1cba1e3229165fb4037b (patch) | |
tree | 326e6499886e03df93bf6e16ed6f32aa4ed40991 /draw.c | |
parent | 47e3e8be7b7df3ed37929dab8941f71cbee19fa9 (diff) | |
download | dmenu-210b303941e517a9d7df1cba1e3229165fb4037b.tar.gz dmenu-210b303941e517a9d7df1cba1e3229165fb4037b.tar.bz2 dmenu-210b303941e517a9d7df1cba1e3229165fb4037b.zip |
paring
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -100,16 +100,13 @@ initdc(void) { if(!setlocale(LC_CTYPE, "") || !XSupportsLocale()) weprintf("no locale support\n"); - if(!(dc = malloc(sizeof *dc))) + if(!(dc = calloc(1, sizeof *dc))) eprintf("cannot malloc %u bytes\n", sizeof *dc); if(!(dc->dpy = XOpenDisplay(NULL))) eprintf("cannot open display\n"); dc->gc = XCreateGC(dc->dpy, DefaultRootWindow(dc->dpy), 0, NULL); XSetLineAttributes(dc->dpy, dc->gc, 1, LineSolid, CapButt, JoinMiter); - dc->font.xfont = NULL; - dc->font.set = NULL; - dc->canvas = None; return dc; } @@ -187,7 +184,7 @@ void weprintf(const char *fmt, ...) { va_list ap; - fprintf(stderr, "%s: warning: ", progname); + fprintf(stderr, "%s: ", progname); va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); |