improve conditional compiling
authorJosé Bollo <jose.bollo@open.eurogiciel.org>
Wed, 16 Jul 2014 14:12:04 +0000 (16:12 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Wed, 16 Jul 2014 15:09:01 +0000 (17:09 +0200)
Change-Id: I447e73c4076c0b0efc1ef9c0d5a67451ba52d852
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
dbus/dbus-connection.c
dbus/dbus-connection.h

index 4eb23f6..af8be96 100644 (file)
@@ -5243,6 +5243,7 @@ dbus_connection_get_unix_process_id (DBusConnection *connection,
   return result;
 }
 
+#ifdef DBUS_ENABLE_SMACK
 /**
  * Gets the Smack label of the peer at the time when the connection
  * was established. Returns #TRUE if the label is filled in.
@@ -5258,15 +5259,10 @@ dbus_connection_get_smack_label (DBusConnection *connection,
   _dbus_return_val_if_fail (connection != NULL, FALSE);
   _dbus_return_val_if_fail (label != NULL, FALSE);
 
-  *label =
-#ifdef DBUS_ENABLE_SMACK
-    connection->peer_smack_label
-#else
-    NULL
-#endif
-    ;
+  *label = connection->peer_smack_label;
   return *label != NULL;
 }
+#endif
 
 /**
  * Gets the ADT audit data of the connection if any.
index 318a3cc..9b7a968 100644 (file)
@@ -264,8 +264,10 @@ dbus_bool_t        dbus_connection_get_unix_user                (DBusConnection
 DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_unix_process_id          (DBusConnection             *connection,
                                                                  unsigned long              *pid);
+#ifdef DBUS_ENABLE_SMACK
 DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_smack_label              (DBusConnection             *connection,
+#endif
                                                                  const char                **label);
 DBUS_EXPORT
 dbus_bool_t        dbus_connection_get_adt_audit_session_data   (DBusConnection             *connection,