aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/lkc.h
diff options
context:
space:
mode:
authorJean Sacren2010-08-04 16:01:02 -0600
committerMichal Marek2010-08-13 00:40:26 +0200
commitbf5e327a300a9ac959a89440e7c67dc89f3bd804 (patch)
treec8be365e0580656dd049e23ef5814bbafe8d73f5 /scripts/kconfig/lkc.h
parent866af407dad3f2202e5d5d717ebd6156ccc33cdd (diff)
kconfig: Fix warning: ignoring return value of 'fwrite'
This fix facilitates fwrite() in both confdata.c and expr.c, either it succeeds in writing, or an error occurs, or the end of file is reached. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/lkc.h')
-rw-r--r--scripts/kconfig/lkc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 76db065ed72c..2ac33f5d273c 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -80,6 +80,13 @@ void sym_set_change_count(int count);
void sym_add_change_count(int count);
void conf_set_all_new_symbols(enum conf_def_mode mode);
+/* confdata.c and expr.c */
+static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
+{
+ if (fwrite(str, len, count, out) < count)
+ fprintf(stderr, "\nError in writing or end of file.\n");
+}
+
/* kconfig_load.c */
void kconfig_load(void);