]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: fix context_t init warning on systems without selinux
authorAlex Deymo <deymo@chromium.org>
Wed, 2 Jul 2014 05:52:32 +0000 (22:52 -0700)
committerPádraig Brady <P@draigBrady.com>
Wed, 2 Jul 2014 09:47:41 +0000 (10:47 +0100)
On systems without libselinux, context_t is defined as an int type,
but defined as a pointer type by SELinux.

* src/chcon.c: Init with 0 rather than NULL to avoid warning.

src/chcon.c

index e253a4639009b6a1282e8396dacd82ffd691bd02..cda06612fe94a3f75fb5e1b474280a6489168558 100644 (file)
@@ -141,7 +141,7 @@ static int
 change_file_context (int fd, char const *file)
 {
   char *file_context = NULL;
-  context_t context IF_LINT (= NULL);
+  context_t context IF_LINT (= 0);
   char const * context_string;
   int errors = 0;