summaryrefslogtreecommitdiff
path: root/xkill.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-22 15:24:07 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-22 15:24:07 -0200
commitb5921d7ad244da5f603e82b559f74496ea87144e (patch)
treef8ee18659602d51938f165b3eaf85be9f64a357f /xkill.c
parent56d891b93917fc4df223cb853d87d0f8055222ff (diff)
Correct make distcheck and sparse warnings.
Diffstat (limited to 'xkill.c')
-rw-r--r--xkill.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/xkill.c b/xkill.c
index 9e3bd6d..2362479 100644
--- a/xkill.c
+++ b/xkill.c
@@ -48,8 +48,8 @@ from The Open Group.
#include <X11/Xmu/WinUtil.h>
-Display *dpy = NULL;
-char *ProgramName;
+static Display *dpy = NULL;
+static char *ProgramName;
#define SelectButtonAny (-1)
#define SelectButtonFirst (-2)
@@ -107,6 +107,7 @@ main(int argc, char *argv[])
Bool top = False;
ProgramName = argv[0];
+ button = SelectButtonFirst;
for (i = 1; i < argc; i++) {
char *arg = argv[i];
@@ -161,9 +162,7 @@ main(int argc, char *argv[])
if (!button_name)
button_name = XGetDefault (dpy, ProgramName, "Button");
- if (!button_name)
- button = SelectButtonFirst;
- else if (!parse_button (button_name, &button)) {
+ if (button_name && !parse_button (button_name, &button)) {
fprintf (stderr, "%s: invalid button specification \"%s\"\n",
ProgramName, button_name);
Exit (1);