diff options
author | Ron Yorston <rmy@pobox.com> | 2021-05-14 08:17:12 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-05-14 08:17:12 +0100 |
commit | a3f5a1b7f4275f713acf22f534f95c0da8392e53 (patch) | |
tree | 49b65422a3e9c33f508da9ccf3ae79d324bd9e96 /scripts/basic/split-include.c | |
parent | 375cda9a88024135d630ca8990d9aff4ea414e89 (diff) | |
parent | 7de0ab21d939a5a304157f75918d0318a95261a3 (diff) | |
download | busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.tar.gz busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.tar.bz2 busybox-w32-a3f5a1b7f4275f713acf22f534f95c0da8392e53.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts/basic/split-include.c')
-rw-r--r-- | scripts/basic/split-include.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index 9a9260f2c..290bea2fb 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -118,7 +118,7 @@ int main(int argc, const char * argv []) | |||
118 | /* We found #define CONFIG_foo or #undef CONFIG_foo. | 118 | /* We found #define CONFIG_foo or #undef CONFIG_foo. |
119 | * Make the output file name. */ | 119 | * Make the output file name. */ |
120 | str_config += sizeof(" CONFIG_") - 1; | 120 | str_config += sizeof(" CONFIG_") - 1; |
121 | for (itarget = 0; !isspace(str_config[itarget]); itarget++) | 121 | for (itarget = 0; !isspace((unsigned char)str_config[itarget]); itarget++) |
122 | { | 122 | { |
123 | int c = (unsigned char) str_config[itarget]; | 123 | int c = (unsigned char) str_config[itarget]; |
124 | if (isupper(c)) c = tolower(c); | 124 | if (isupper(c)) c = tolower(c); |
@@ -133,7 +133,7 @@ int main(int argc, const char * argv []) | |||
133 | is_same = 0; | 133 | is_same = 0; |
134 | if ((fp_target = fopen(ptarget, "r")) != NULL) | 134 | if ((fp_target = fopen(ptarget, "r")) != NULL) |
135 | { | 135 | { |
136 | if (!fgets(old_line, buffer_size, fp_target)) | 136 | if (!fgets(old_line, buffer_size, fp_target) && ferror(fp_target)) |
137 | ERROR_EXIT(ptarget); | 137 | ERROR_EXIT(ptarget); |
138 | if (fclose(fp_target) != 0) | 138 | if (fclose(fp_target) != 0) |
139 | ERROR_EXIT(ptarget); | 139 | ERROR_EXIT(ptarget); |