Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbcKBSq5 (ORCPT ); Wed, 2 Nov 2016 14:46:57 -0400 Received: from mout.web.de ([212.227.17.12]:49493 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757281AbcKBSqy (ORCPT ); Wed, 2 Nov 2016 14:46:54 -0400 Subject: Re: scripts/basic/bin2c: Complete error handling in main() To: 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: Michal Marek , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Wed, 2 Nov 2016 19:46:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:uIvgxgztB45kOLQfkrB5jc5GXqmyEfIql75uh8NufRe6dYQ80xV NjV//X0RBHKhqAjjjn2qdupAq3sJ7lkamVP8U4dDVXgRsEElFEtSG8IoXxKlNYCmmsCvP3i w9Bmv45AIJgpC0zdpJ8BEbGaZsz4YuHmsjC6HhARtrc/7U9zFk5BzMKTN38Etx1GVXmW3nu hCNacIdOCGuaUTo2gcyqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:byvtSBYrpHA=:FkeUlRx3e7jc1n+Ge30n1j GT2oC7ORxNxoDp3QAXL5IikEbnpWixPO5BDLUNC9NDhml/Jv1wY08fQPB42Dopfbf2fyEl98J aXbAt+W+x9SID0WwnSZ8vVOaUigrqjNDZVFy3mnMifPD16PU9u6bhYeNVYbqEm/0uRY32z5oJ HlQHhvSl6qxBpUFSS0X7vyz/VGGVV3aWw/IDzGF7KP+dXhHx3kBxEc6wOAmO56R5trTzbfH1w jARAUJewOhGXfKPUmr39S3Ivgbjb6gph5h09Sx2I/Bfr7UdXiwCtYX92ywCJ4B+YqpwEascBE fFmQgkn5v+1NuuIYsJjf02NG35UBx/gMpOQl1chtbsN8dAoLNj5QttW5weyBZkX622GsNM8XM M9G1uWB7wYdIiWcCcjlJqONwll+GviMEqUGWILP+OkfA+9aEyJfVCy3BhrOeXDcqEcHEiXMmZ LW/0jFhLOodYQza9EA9nfzWsMwjgEnloMZ7oiMV0Hs49d0nvGwyo2DCWGCrRh+SUH+PgU11YX yeM9f42hj+oNik6eygjttNnJLRVjQC9BSS4HxTQl3LU/Sk35jAVkAQAfrKamD5T5PhhxN3rPJ QKjiq636X+WFVIMvByG5Wacr47guaeZl8Tqjfu5ESTVmmLRAc3TXWLewxKOIg2KW5DGdeykZl QF0vVFygV61q9nyxiWvgSeHo6YIYz3BvqBeYe5oBP3swIhhlin2OQdCZ1MCrAHQz+tDQLcQxG LCiuanHUkEmmq2RIvEPqJZZwzcn9Awpn1QwJtacNZzR6aYj8hwfeZ4vpvWjGNptSPyUSOltHD fppi7bu Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 249 Lines: 11 > I like the code as is. Do you really prefer to ignore important return values in the discussed function? > Such error checks and magic numbers are messy. Is it safer to detect exceptional situations as early as possible here? Regards, Markus