aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/basic')
-rw-r--r--scripts/basic/split-include.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index e328788e2..791d142a8 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -131,7 +131,8 @@ int main(int argc, const char * argv [])
is_same = 0;
if ((fp_target = fopen(ptarget, "r")) != NULL)
{
- fgets(old_line, buffer_size, fp_target);
+ if (!fgets(old_line, buffer_size, fp_target))
+ ERROR_EXIT(ptarget);
if (fclose(fp_target) != 0)
ERROR_EXIT(ptarget);
if (!strcmp(line, old_line))