chiark
/
gitweb
/
~ianmdlvl
/
xtrlock.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
842c430
)
Tidy up command-line handling
author
Matthew Vernon
<matthew@debian.org>
Sun, 5 Jan 2014 12:07:00 +0000
(12:07 +0000)
committer
Matthew Vernon
<matthew@debian.org>
Sun, 5 Jan 2014 12:07:00 +0000
(12:07 +0000)
Patch as supplied had a logic error if one (incorrect) argument was
supplied. This fixes that, and neatens up the usage message.
xtrlock.c
patch
|
blob
|
history
diff --git
a/xtrlock.c
b/xtrlock.c
index 86cc94a821dc320e6b28bbc76935eb8a07c0afef..3d5ce704eb5e4bf91059c15364555f1b54de11d3 100644
(file)
--- a/
xtrlock.c
+++ b/
xtrlock.c
@@
-90,8
+90,8
@@
int main(int argc, char **argv){
if ((argc == 2) && (strcmp(argv[1], "-b") == 0)) {
blank = 1;
- } else if (argc >
2
) {
- fprintf(stderr,"xtrlock (version %s)
: no arguments or \"-b\" (blank screen) allowed
\n",
+ } else if (argc >
1
) {
+ fprintf(stderr,"xtrlock (version %s)
; usage: xtrlock [-b]
\n",
program_version);
exit(1);
}