aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index d01f962e879f..a49cf4f7dca5 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -7,13 +7,13 @@
7#include <ctype.h> 7#include <ctype.h>
8#include <errno.h> 8#include <errno.h>
9#include <fcntl.h> 9#include <fcntl.h>
10#include <stdarg.h>
10#include <stdio.h> 11#include <stdio.h>
11#include <stdlib.h> 12#include <stdlib.h>
12#include <string.h> 13#include <string.h>
13#include <time.h> 14#include <time.h>
14#include <unistd.h> 15#include <unistd.h>
15 16
16#define LKC_DIRECT_LINK
17#include "lkc.h" 17#include "lkc.h"
18 18
19static void conf_warning(const char *fmt, ...) 19static void conf_warning(const char *fmt, ...)
@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
128 sym->flags |= def_flags; 128 sym->flags |= def_flags;
129 break; 129 break;
130 } 130 }
131 /* fall through */
131 case S_BOOLEAN: 132 case S_BOOLEAN:
132 if (p[0] == 'y') { 133 if (p[0] == 'y') {
133 sym->def[def].tri = yes; 134 sym->def[def].tri = yes;
@@ -140,7 +141,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
140 break; 141 break;
141 } 142 }
142 conf_warning("symbol value '%s' invalid for %s", p, sym->name); 143 conf_warning("symbol value '%s' invalid for %s", p, sym->name);
143 break; 144 return 1;
144 case S_OTHER: 145 case S_OTHER:
145 if (*p != '"') { 146 if (*p != '"') {
146 for (p2 = p; *p2 && !isspace(*p2); p2++) 147 for (p2 = p; *p2 && !isspace(*p2); p2++)
@@ -148,6 +149,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
148 sym->type = S_STRING; 149 sym->type = S_STRING;
149 goto done; 150 goto done;
150 } 151 }
152 /* fall through */
151 case S_STRING: 153 case S_STRING:
152 if (*p++ != '"') 154 if (*p++ != '"')
153 break; 155 break;
@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
162 conf_warning("invalid string found"); 164 conf_warning("invalid string found");
163 return 1; 165 return 1;
164 } 166 }
167 /* fall through */
165 case S_INT: 168 case S_INT:
166 case S_HEX: 169 case S_HEX:
167 done: 170 done:
@@ -237,6 +240,7 @@ load:
237 case S_STRING: 240 case S_STRING:
238 if (sym->def[def].val) 241 if (sym->def[def].val)
239 free(sym->def[def].val); 242 free(sym->def[def].val);
243 /* fall through */
240 default: 244 default:
241 sym->def[def].val = NULL; 245 sym->def[def].val = NULL;
242 sym->def[def].tri = no; 246 sym->def[def].tri = no;
@@ -363,6 +367,7 @@ int conf_read(const char *name)
363 break; 367 break;
364 if (!sym_is_choice(sym)) 368 if (!sym_is_choice(sym))
365 goto sym_ok; 369 goto sym_ok;
370 /* fall through */
366 default: 371 default:
367 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) 372 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
368 goto sym_ok; 373 goto sym_ok;