From 01b16b2d6bf53a0140593611f20d9026045ed7fd Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 3 Apr 2024 19:14:36 +0000 Subject: [PATCH] move help to another statement --- ccc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ccc.c b/ccc.c index 325eb5a..e6c36a5 100644 --- a/ccc.c +++ b/ccc.c @@ -63,9 +63,10 @@ unsigned long total_dir_size; int main(int argc, char** argv) { - if (argc > 1 && strcmp(argv[1], "-h") == 0) - die("Usage: ccc filename"); if (argc == 2) { + if (strcmp(argv[1], "-h") == 0) + die("Usage: ccc filename"); + struct stat st; if (lstat(argv[1], &st)) { perror("ccc");