summaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r--scripts/basic/fixdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index e8e8c7756d..9bd0de2490 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -296,7 +296,11 @@ static void do_config_file(const char *filename)
perror(filename);
exit(2);
}
- fstat(fd, &st);
+ if (fstat(fd, &st) < 0) {
+ fprintf(stderr, "fixdep: error fstat'ing config file: ");
+ perror(filename);
+ exit(2);
+ }
if (st.st_size == 0) {
close(fd);
return;