From patchwork Thu Feb 16 17:28:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 9577783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC35260586 for ; Thu, 16 Feb 2017 17:28:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EF0228628 for ; Thu, 16 Feb 2017 17:28:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93C3A2864F; Thu, 16 Feb 2017 17:28:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C46528628 for ; Thu, 16 Feb 2017 17:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932193AbdBPR2s (ORCPT ); Thu, 16 Feb 2017 12:28:48 -0500 Received: from mga06.intel.com ([134.134.136.31]:32024 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932769AbdBPR2c (ORCPT ); Thu, 16 Feb 2017 12:28:32 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 16 Feb 2017 09:28:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,169,1484035200"; d="scan'208";a="1128476527" Received: from ldmartin-desk.jf.intel.com ([10.24.10.235]) by fmsmga002.fm.intel.com with ESMTP; 16 Feb 2017 09:28:31 -0800 From: Lucas De Marchi To: linux-modules@vger.kernel.org Cc: James Minor , julia.cartwright@ni.com, zach.brown@ni.com, ken.sharp@ni.com Subject: [PATCH 1/2] libkmod-config: replace 0/1 with bool Date: Thu, 16 Feb 2017 09:28:30 -0800 Message-Id: <20170216172831.3019-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.9.3 Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP --- libkmod/libkmod-config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c index 0596025..18f300a 100644 --- a/libkmod/libkmod-config.c +++ b/libkmod/libkmod-config.c @@ -496,8 +496,8 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) { char buf[KCMD_LINE_SIZE]; int fd, err; - char *p, *modname, *param = NULL, *value = NULL, is_module = 1; - bool is_quoted = false; + char *p, *modname, *param = NULL, *value = NULL; + bool is_quoted = false, is_module = true; fd = open("/proc/cmdline", O_RDONLY|O_CLOEXEC); if (fd < 0) { @@ -528,7 +528,7 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) kcmdline_parse_result(config, modname, param, value); param = value = NULL; modname = p + 1; - is_module = 1; + is_module = true; break; case '.': if (param == NULL) { @@ -540,7 +540,7 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) if (param != NULL) value = p + 1; else - is_module = 0; + is_module = false; break; } }