Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757961AbcKCPm3 (ORCPT ); Thu, 3 Nov 2016 11:42:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:44242 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751691AbcKCPm1 (ORCPT ); Thu, 3 Nov 2016 11:42:27 -0400 Subject: Re: scripts/basic/bin2c: Complete error handling in main() To: SF Markus Elfring , Masahiro Yamada , linux-kbuild@vger.kernel.org References: <72e07814-56e9-505a-d660-91ff20b6efea@users.sourceforge.net> <44402655-ef0d-1e2f-0587-f17295a08aa3@users.sourceforge.net> <0fcf5fb3-ff4a-a003-7814-51a6ab5ad988@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: Michal Marek Message-ID: Date: Thu, 3 Nov 2016 16:42:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 300 Lines: 9 Dne 2.11.2016 v 19:46 SF Markus Elfring napsal(a): >> I like the code as is. > > Do you really prefer to ignore important return values in the discussed function? You could define an xprintf() macro that checks if the return value is < 0 and simply calls perror() and exit(1) in such case. Michal