From 2b0b6051ab465cc2a0a35178b268f3cb8b65a209 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Wed, 23 Nov 2011 13:05:53 -0500 Subject: [PATCH] --- yaml --- r: 285824 b: refs/heads/master c: 37ae2d5998aa29d8bf52f124199a21341bc6d18d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/kconfig/expr.h | 1 + trunk/scripts/kconfig/lkc.h | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 94dbfec0a6a6..deabec85b1ab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e2aef4d33ac43ec45e4fc2903288030d7f464832 +refs/heads/master: 37ae2d5998aa29d8bf52f124199a21341bc6d18d diff --git a/trunk/scripts/kconfig/expr.h b/trunk/scripts/kconfig/expr.h index 80fce57080cc..d4ecce8bc3a6 100644 --- a/trunk/scripts/kconfig/expr.h +++ b/trunk/scripts/kconfig/expr.h @@ -10,6 +10,7 @@ extern "C" { #endif +#include #include #ifndef __cplusplus #include diff --git a/trunk/scripts/kconfig/lkc.h b/trunk/scripts/kconfig/lkc.h index b633bdb9f3d4..c18f2bd9c095 100644 --- a/trunk/scripts/kconfig/lkc.h +++ b/trunk/scripts/kconfig/lkc.h @@ -90,8 +90,10 @@ struct conf_printer { /* 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"); + assert(len != 0); + + if (fwrite(str, len, count, out) != count) + fprintf(stderr, "Error in writing or end of file.\n"); } /* menu.c */