move help to another statement

This commit is contained in:
Night Kaly 2024-04-03 19:14:36 +00:00
parent 0c9429ca53
commit 01b16b2d6b
Signed by: night0721
GPG key ID: 957D67B8DB7A119B

5
ccc.c
View file

@ -63,9 +63,10 @@ unsigned long total_dir_size;
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
if (argc > 1 && strcmp(argv[1], "-h") == 0)
die("Usage: ccc filename");
if (argc == 2) { if (argc == 2) {
if (strcmp(argv[1], "-h") == 0)
die("Usage: ccc filename");
struct stat st; struct stat st;
if (lstat(argv[1], &st)) { if (lstat(argv[1], &st)) {
perror("ccc"); perror("ccc");