summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/basic/split-include.c')
-rw-r--r--scripts/basic/split-include.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index 60934b5..e328788 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -110,11 +110,12 @@ int main(int argc, const char * argv [])
if (line[0] != '#')
continue;
- if ((str_config = strstr(line, "CONFIG_")) == NULL)
+ if ((str_config = strstr(line, " CONFIG_")) == NULL)
continue;
- /* Make the output file name. */
- str_config += sizeof("CONFIG_") - 1;
+ /* We found #define CONFIG_foo or #undef CONFIG_foo.
+ * Make the output file name. */
+ str_config += sizeof(" CONFIG_") - 1;
for (itarget = 0; !isspace(str_config[itarget]); itarget++)
{
int c = (unsigned char) str_config[itarget];