diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-22 15:24:07 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-22 15:24:07 -0200 |
commit | b5921d7ad244da5f603e82b559f74496ea87144e (patch) | |
tree | f8ee18659602d51938f165b3eaf85be9f64a357f /xkill.c | |
parent | 56d891b93917fc4df223cb853d87d0f8055222ff (diff) |
Correct make distcheck and sparse warnings.
Diffstat (limited to 'xkill.c')
-rw-r--r-- | xkill.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); |