printing usage() instead of crappy error messgae in wmiibar

This commit is contained in:
Anselm R. Garbe 2006-01-29 22:32:20 +02:00
parent 53ecafb2e3
commit 51f09cc007

View File

@ -1003,10 +1003,8 @@ main(int argc, char *argv[])
XSetErrorHandler(dummy_error_handler); XSetErrorHandler(dummy_error_handler);
screen_num = DefaultScreen(dpy); screen_num = DefaultScreen(dpy);
if(!address) { if(!address)
fprintf(stderr, "%s\n", "wmiibar: no socket address provided"); usage();
exit(1);
}
i = ixp_create_sock(address, &errstr); i = ixp_create_sock(address, &errstr);
if(i < 0) { if(i < 0) {
fprintf(stderr, "wmiibar: fatal: %s\n", errstr); fprintf(stderr, "wmiibar: fatal: %s\n", errstr);