uwrap: Fix logging on optimized build
authorAndreas Schneider <asn@samba.org>
Fri, 21 Jul 2017 09:39:59 +0000 (11:39 +0200)
committerAndreas Schneider <asn@samba.org>
Fri, 21 Jul 2017 15:19:17 +0000 (17:19 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/uid_wrapper.c

index 0e9be9655ad7c7d0f62bfaefd8d40de6b4870840..bbd2c17b207fe9b0d71995fc586be5c8f10dee89 100644 (file)
@@ -1333,9 +1333,7 @@ static int uwrap_setreuid_args(uid_t ruid, uid_t euid,
 
 static int uwrap_setreuid_thread(uid_t ruid, uid_t euid)
 {
-#ifndef NDEBUG
        struct uwrap_thread *id = uwrap_tls_id;
-#endif
        uid_t new_ruid = -1, new_euid = -1, new_suid = -1;
        int rc;
 
@@ -1354,9 +1352,7 @@ static int uwrap_setreuid_thread(uid_t ruid, uid_t euid)
 #ifdef HAVE_SETREUID
 static int uwrap_setreuid(uid_t ruid, uid_t euid)
 {
-#ifndef NDEBUG
        struct uwrap_thread *id = uwrap_tls_id;
-#endif
        uid_t new_ruid = -1, new_euid = -1, new_suid = -1;
        int rc;
 
@@ -1620,9 +1616,7 @@ static int uwrap_setregid_args(gid_t rgid, gid_t egid,
 
 static int uwrap_setregid_thread(gid_t rgid, gid_t egid)
 {
-#ifndef NDEBUG
        struct uwrap_thread *id = uwrap_tls_id;
-#endif
        gid_t new_rgid = -1, new_egid = -1, new_sgid = -1;
        int rc;
 
@@ -1641,9 +1635,7 @@ static int uwrap_setregid_thread(gid_t rgid, gid_t egid)
 #ifdef HAVE_SETREGID
 static int uwrap_setregid(gid_t rgid, gid_t egid)
 {
-#ifndef NDEBUG
        struct uwrap_thread *id = uwrap_tls_id;
-#endif
        gid_t new_rgid = -1, new_egid = -1, new_sgid = -1;
        int rc;