Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2229361img; Sun, 24 Mar 2019 03:11:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNSMqpK41WnC9vjSCcJxnonSRhiCv89l8Yn9UeT4WoVMrRCHyVudba2cP3/iUfjl7MQ2CG X-Received: by 2002:aa7:938b:: with SMTP id t11mr11313305pfe.67.1553422309196; Sun, 24 Mar 2019 03:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553422309; cv=none; d=google.com; s=arc-20160816; b=Ph26jVlCaoQU6wItmOcFIkIv19ggIqK59r+tTRPiWzD9vIAf/+3ZR+5NgFg2qNBuk7 BDWGK9UYaO5sjX1X8NQQfQc4EGzUXa6rnMjZWjoa3cqS8G6c3jOK+ZkniAkyjO0qTHIm OiJcyhClIxwCITvoCAOejavNgAFq0H8KlMD+ghTuGA/0kCiRpt20KokU2hfrFWzpUL0B nVzrJ2253HLBDzyTUC4SLboz5GObuscXF4YmLqhslJSLjkQndQCt5aqgO2FzgQM77yx6 PgH/ECHgN0uM3v2PpYGKbV8m+X/dAsR+RqKxQQpDhETv0bwX+JHx03+W5XvnyEgxMV0J 7wvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=jlGGEIV7cZHoWp38KFQeNPFLLCHH4bB7kg91XEBsuhQ=; b=erzYZizrtYVC5iMACKjTJ94zqAi/abfr/aae+4E1PBsuki1mgWk2l+rVF2DYn2jpeR tnKgJjfvQh2nJFZ3Ifwx7BEQrkQ4IggpllG2uwj0es1DhT6zMK0ow7mEBpKohqoZ02Sc 60nGrI4zlzbpKy1M6AQCGzST+3m0jGUImDfiLcusfOsaUSe7PNBMsLWJ7ZUAYTn2krGc MWFIzTCnzSjn7+8KilbRsEWQ4LzaNKz00l6x3mVqEbZWjbNwnNKzfduZUN90m5tx7HxD d4wPsOoooe45O4OHnyjWCD8dSEpYvoGhoO+T2nlNP/ckEPJfZWbEASRdEq3f2n9ZapMu Zm3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pl3xv5lg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si11034071pfy.157.2019.03.24.03.11.31; Sun, 24 Mar 2019 03:11:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pl3xv5lg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728642AbfCXKKO (ORCPT + 99 others); Sun, 24 Mar 2019 06:10:14 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36993 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727221AbfCXKKL (ORCPT ); Sun, 24 Mar 2019 06:10:11 -0400 Received: by mail-pg1-f196.google.com with SMTP id q206so4443539pgq.4; Sun, 24 Mar 2019 03:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=jlGGEIV7cZHoWp38KFQeNPFLLCHH4bB7kg91XEBsuhQ=; b=Pl3xv5lgs+4aWoosnaKgbkh0cHNwFK0zuoxdcddlvwr4iRq9uEyewuKf7QSFfmSHTP +SSh4EURx1Ezi57QwhvDflbqM0j3+ZOmIZviSIV1NBfn6mu6qLUYbInmaj1dIX2e/m3Y 8uBBNDRscOPS16/C0xnjt8YQSFj0busqeBALSgqmyiaNVS0zMdCzxc3tvemTOn4ff8BB 8uPlQ3lLCEAUHSlkN6su5gLRgReLnuYLt5NYFaEIZNivrxQljlV0t0R+1YoupyWTjucR D6L0hGODvl0bN/M5l6ly/wP6PeqdFm+w/bpty58MTtsLKe76IdBkRmYGk+d3oGOEeSEf mzQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=jlGGEIV7cZHoWp38KFQeNPFLLCHH4bB7kg91XEBsuhQ=; b=kvgjTri94/y/naj+kTyQfzzEWuSEBaz99ZAAEUfn45Wce1u1CMfOT7RU39KS12J/FD ahPf8oRZaBZROKMdC/3r6TxRwhBJFlVCidNmqhqqZNkZ9oOc/7UjrISOh8ixoEXthHEX QK2oTkyMpyabGENWawHlE7GTAxKjZ4yLc3/q7SYx06ny+Z18BQ/m03JsG+TcIMAUNKkO 2+qoZfZ6uk1if9JPmF5aFsQGKyVuQ7npSRP3DRyY7s8U3W9r/pQ5EN5GUk0jX2h23DnG ogvtUaWFZupMKKZCk5Rf0ctcZL7hzGIKnagdNrESdWU/VM6YGRQN5QhaeKnq+6dzphWx TVCw== X-Gm-Message-State: APjAAAXhZYXBBZidxhyZ5/A/mXAMbPTBquqpJgC/bHtdmQflShhngoom HHSH8O7V9uvYHe68jh0bZ1M= X-Received: by 2002:a17:902:4383:: with SMTP id j3mr1473904pld.58.1553422210805; Sun, 24 Mar 2019 03:10:10 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.91.90]) by smtp.gmail.com with ESMTPSA id m25sm2754188pfa.175.2019.03.24.03.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 03:10:10 -0700 (PDT) Date: Sun, 24 Mar 2019 15:40:03 +0530 From: Hariprasad Kelam To: paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org, omosnace@redhat.com, keescook@chromium.org, rgb@redhat.com, jannh@google.com, adobriyan@gmail.com, sgrover@codeaurora.org, peter.enderborg@sony.com, kent.overstreet@gmail.com, selinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selinux: fixed parse warning Using plain integer as NULL pointer Message-ID: <20190324101003.GA17131@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changed 0 --> NULL to avoid sparse warning Sparse warning below: sudo make C=2 CF=-D__CHECK_ENDIAN__ M=security CHECK security/selinux/ss/services.c security/selinux/ss/services.c:1323:32: warning: Using plain integer as NULL pointer Signed-off-by: Hariprasad Kelam --- security/selinux/ss/services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ec62918..30cea59 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -1320,7 +1320,7 @@ static int security_sid_to_context_core(struct selinux_state *state, } if (only_invalid && !context->len) { scontext = NULL; - scontext_len = 0; + scontext_len = NULL; rc = 0; } else { rc = context_struct_to_string(policydb, context, scontext, -- 2.7.4