summaryrefslogtreecommitdiffstats
path: root/sys-utils/flock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/flock.c')
-rw-r--r--sys-utils/flock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index dcd0f5e40..08e313e69 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -214,12 +214,10 @@ int main(int argc, char *argv[])
case 'V':
printf(UTIL_LINUX_VERSION);
exit(EX_OK);
+ case 'h':
+ usage(0);
default:
- /* optopt will be set if this was an unrecognized
- * option, i.e. *not* 'h' or '?
- */
- usage(optopt ? EX_USAGE : 0);
- break;
+ errtryhelp(EX_USAGE);
}
}