X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=slock.c;h=47231021ced0cb9416d45979ce145786cee0b54f;hb=a430a647e48a894499143b03da86e5707b4127df;hp=a7f79d9f2ba713caad01fc19d11a3c5fa8a285a4;hpb=6fdf8be2044145c11f7e1eb165613f791c514520;p=slock.git diff --git a/slock.c b/slock.c index a7f79d9..4723102 100644 --- a/slock.c +++ b/slock.c @@ -69,8 +69,10 @@ main(int argc, char **argv) { XEvent ev; XSetWindowAttributes wa; - if((argc > 1) && !strncmp(argv[1], "-v", 3)) - eprint("slock-"VERSION", © 2006-2007 Anselm R. Garbe, Sander van Dijk\n"); + if((argc == 2) && !strcmp("-v", argv[1])) + eprint("slock-"VERSION", © 2006-2007 Anselm R. Garbe\n"); + else if(argc != 1) + eprint("usage: slock [-v]\n"); pws = get_password(); if(!(dpy = XOpenDisplay(0))) eprint("slock: cannot open display\n");