Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755649AbcKBPfv (ORCPT ); Wed, 2 Nov 2016 11:35:51 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:21889 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbcKBPft (ORCPT ); Wed, 2 Nov 2016 11:35:49 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com uA2FZXrb010789 X-Nifty-SrcIP: [209.85.161.169] MIME-Version: 1.0 In-Reply-To: References: <72e07814-56e9-505a-d660-91ff20b6efea@users.sourceforge.net> From: Masahiro Yamada Date: Thu, 3 Nov 2016 00:35:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 09/10] scripts/basic/fixdep: Complete error handling in print_cmdline() To: Jim Davis Cc: SF Markus Elfring , Linux Kbuild mailing list , Michal Marek , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 541 Lines: 20 2016-10-29 8:42 GMT+09:00 Jim Davis : > On Fri, Oct 28, 2016 at 1:40 AM, SF Markus Elfring > wrote: > >> + if (printf("cmd_%s := %s\n\n", target, cmdline) < 10) { > > Rather than scatter fragile magic numbers, like 10, throughout the > code, if you're hell-bent on checking for printf errors you could > write a little wrapper function that hid the magic number and bundled > up the errno stuff. BTW, how the magic number "10" was calculated? -- Best Regards Masahiro Yamada