Fix 2 NULL pointer dereferences.

This commit is contained in:
matthieu 2012-03-06 23:23:44 +00:00
parent c5e1bb148a
commit 7aed9f3167

View File

@ -1,4 +1,4 @@
/* $OpenBSD: xtsscale.c,v 1.21 2011/07/16 17:54:07 matthieu Exp $ */
/* $OpenBSD: xtsscale.c,v 1.22 2012/03/06 23:23:44 matthieu Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
* Copyright (c) 2009,2011 Matthieu Herrb <matthieu@herrb.eu>
@ -612,7 +612,7 @@ main(int argc, char *argv[], char *env[])
/* connect to X server */
if ((display = XOpenDisplay(display_name)) == NULL) {
fprintf(stderr, "%s: cannot connect to X server %s\n",
argv[0], XDisplayName(display_name));
__progname, XDisplayName(display_name));
exit(1);
}
screen = DefaultScreen(display);
@ -653,7 +653,7 @@ main(int argc, char *argv[], char *env[])
if (!XQueryExtension(display, INAME, &xi_opcode,
&event, &error)) {
fprintf(stderr, "%s: X Input extension not available.\n",
argv[0]);
__progname);
exit(1);
}