diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index e9b827ffb58f10d3cdcb73e45e332e34ae2b47ed..6cf6421399644b359e08ea84493de419c71bc941 100644 (file)
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
}
/* Check file argument(s): */
- if (stdin_paths && filei < argc)
- error_with_usage("Can't specify files with --stdin");
+ if (stdin_paths) {
+ if (filei < argc)
+ error_with_usage("Can't specify files with --stdin");
+ } else {
+ if (filei >= argc)
+ error_with_usage("No file specified");
+ }
check = xcalloc(cnt, sizeof(*check));
for (i = 0; i < cnt; i++) {