mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
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
Date: Sun, 24 Mar 2019 15:40:03 +0530	[thread overview]
Message-ID: <20190324101003.GA17131@hari-Inspiron-1545> (raw)

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 <hariprasad.kelam@gmail.com>
---
 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


             reply	other threads:[~2019-03-24 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 10:10 Hariprasad Kelam [this message]
2019-03-24 10:57 ` Ondrej Mosnacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190324101003.GA17131@hari-Inspiron-1545 \
    --to=hariprasad.kelam@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=eparis@parisplace.org \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=peter.enderborg@sony.com \
    --cc=rgb@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    --cc=sgrover@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®