projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: make xfgets() really static
[carl9170fw.git]
/
config
/
conf.c
diff --git
a/config/conf.c
b/config/conf.c
index 7c2b7a7d0aff2d56dccd34360f17a9ded6756897..06ddb0514f141e1a551dab50c4b8744386de5334 100644
(file)
--- a/
config/conf.c
+++ b/
config/conf.c
@@
-20,7
+20,6
@@
static void conf(struct menu *menu);
static void check_conf(struct menu *menu);
static void conf(struct menu *menu);
static void check_conf(struct menu *menu);
-static void xfgets(char *str, int size, FILE *in);
enum input_mode {
oldaskconfig,
enum input_mode {
oldaskconfig,
@@
-81,6
+80,13
@@
static void check_stdin(void)
}
}
}
}
+/* Helper function to facilitate fgets() by Jean Sacren. */
+static void xfgets(char *str, int size, FILE *in)
+{
+ if (!fgets(str, size, in))
+ fprintf(stderr, "\nError in reading or end of file.\n");
+}
+
static int conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
static int conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
@@
-668,12
+674,3
@@
int main(int ac, char **av)
}
return 0;
}
}
return 0;
}
-
-/*
- * Helper function to facilitate fgets() by Jean Sacren.
- */
-void xfgets(char *str, int size, FILE *in)
-{
- if (fgets(str, size, in) == NULL)
- fprintf(stderr, "\nError in reading or end of file.\n");
-}