From patchwork Wed Jun 2 14:44:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Weber X-Patchwork-Id: 103821 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o52EitUH007082 for ; Wed, 2 Jun 2010 14:44:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757945Ab0FBOoz (ORCPT ); Wed, 2 Jun 2010 10:44:55 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:55967 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755411Ab0FBOoy convert rfc822-to-8bit (ORCPT ); Wed, 2 Jun 2010 10:44:54 -0400 Received: from corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net [212.114.252.242]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LhkkD-1P6cP20svB-00mTO5; Wed, 02 Jun 2010 16:44:41 +0200 Received: from Lupus.CS.local (unknown [192.168.102.87]) by corscience.de (Postfix) with ESMTP id BA59751E70; Wed, 2 Jun 2010 16:44:40 +0200 (CEST) From: Thomas Weber To: zippel@linux-m68k.org Cc: Thomas Weber , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scripts: confdata: Fix fwrite warning Date: Wed, 2 Jun 2010 16:44:19 +0200 Message-Id: <1275489859-31874-1-git-send-email-weber@corscience.de> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Provags-ID: V01U2FsdGVkX1+b5DuLAlwTGcRgl8sWyOfZvhDcrMn3fRAEwHi smyhixEH/0HwOS1CcZupJIyN+vUWmM04wcqfwnbhgjCYkrvQ9m FG7WDQsjHjEGFY4g9gRAA== Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 02 Jun 2010 14:44:55 +0000 (UTC) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index c4dec80..4741fea 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -505,7 +505,10 @@ int conf_write(const char *name) while (1) { l = strcspn(str, "\"\\"); if (l) { - fwrite(str, l, 1, out); + if (fwrite(str, l, 1, out) != 1) { + fprintf(stderr, "write str failed\n"); + return 1; + } str += l; } if (!*str) @@ -756,8 +759,14 @@ int conf_write_autoconf(void) while (1) { l = strcspn(str, "\"\\"); if (l) { - fwrite(str, l, 1, out); - fwrite(str, l, 1, out_h); + if (fwrite(str, l, 1, out) != 1) { + fprintf(stderr, "write str failed\n"); + return 1; + } + if (fwrite(str, l, 1, out_h) != 1) { + fprintf(stderr, "write str failed\n"); + return 1; + } str += l; } if (!*str)