From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-711598-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 8E0BC13877A
	for <garchives@archives.gentoo.org>; Wed, 16 Jul 2014 19:48:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1FA80E09A9;
	Wed, 16 Jul 2014 19:48:27 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A6F08E09A9
	for <gentoo-commits@lists.gentoo.org>; Wed, 16 Jul 2014 19:48:26 +0000 (UTC)
Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 90A4433F155
	for <gentoo-commits@lists.gentoo.org>; Wed, 16 Jul 2014 19:48:25 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by spoonbill.gentoo.org (Postfix) with ESMTP id 46D381807D
	for <gentoo-commits@lists.gentoo.org>; Wed, 16 Jul 2014 19:48:24 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1405540083.8b8edc29705b843988b97242942a409241c182eb.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/rc-selinux.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 8b8edc29705b843988b97242942a409241c182eb
X-VCS-Branch: master
Date: Wed, 16 Jul 2014 19:48:24 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 90d01a36-e692-40c1-9ad0-cad265814813
X-Archives-Hash: 93cab3a50704bd6baed88e75421fa005

commit:     8b8edc29705b843988b97242942a409241c182eb
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Jul 16 19:48:03 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jul 16 19:48:03 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=8b8edc29

style fixes

---
 src/rc/rc-selinux.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/rc/rc-selinux.c b/src/rc/rc-selinux.c
index 8e780c9..7c1ee80 100644
--- a/src/rc/rc-selinux.c
+++ b/src/rc/rc-selinux.c
@@ -40,8 +40,7 @@
 
 static struct selabel_handle *hnd = NULL;
 
-int
-selinux_util_label(const char *path)
+int selinux_util_label(const char *path)
 {
 	int retval = 0;
 	int enforce;
@@ -52,12 +51,12 @@ selinux_util_label(const char *path)
 	if (retval < 0)
 		return retval;
 
-	if (NULL == hnd)
+	if (!hnd)
 		return (enforce) ? -1 : 0;
 
 	retval = lstat(path, &st);
 	if (retval < 0) {
-		if (ENOENT == errno)
+		if (errno == ENOENT)
 			return 0;
 		return (enforce) ? -1 : 0;
 	}
@@ -65,7 +64,7 @@ selinux_util_label(const char *path)
 	/* lookup the context */
 	retval = selabel_lookup_raw(hnd, &con, path, st.st_mode);
 	if (retval < 0) {
-		if (ENOENT == errno)
+		if (errno == ENOENT)
 			return 0;
 		return (enforce) ? -1 : 0;
 	}
@@ -74,9 +73,9 @@ selinux_util_label(const char *path)
 	retval = lsetfilecon(path, con);
 	freecon(con);
 	if (retval < 0) {
-		if (ENOENT == errno)
+		if (errno == ENOENT)
 			return 0;
-		if (ENOTSUP == errno)
+		if (errno == ENOTSUP)
 			return 0;
 		return (enforce) ? -1 : 0;
 	}
@@ -88,8 +87,7 @@ selinux_util_label(const char *path)
  * Open the label handle
  * returns 1 on success, 0 if no selinux, negative on error
  */
-int
-selinux_util_open(void)
+int selinux_util_open(void)
 {
 	int retval = 0;
 
@@ -98,7 +96,7 @@ selinux_util_open(void)
 		return retval;
 
 	hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
-	if (NULL == hnd)
+	if (!hnd)
 		return -2;
 
 	return 1;
@@ -108,8 +106,7 @@ selinux_util_open(void)
  * Close the label handle
  * returns 1 on success, 0 if no selinux, negative on error
  */
-int
-selinux_util_close(void)
+int selinux_util_close(void)
 {
 	int retval = 0;