summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Zeller <mike@mikezeller.net>2021-05-27 14:39:40 -0400
committerMike Zeller <mike@mikezeller.net>2021-05-27 14:39:40 -0400
commit5ed7010bd8b459dac11d49bae4a998298a8f11ea (patch)
treefde1638fddb59c9183c94428a0415136d91b0fef
parent0e313039d301861738afb2457389250be6bea2a6 (diff)
parent9d8d665c91deb747dc87371e4cc29a54de68fd3f (diff)
downloadillumos-joyent-5ed7010bd8b459dac11d49bae4a998298a8f11ea.tar.gz
[illumos-gate merge]
commit 9d8d665c91deb747dc87371e4cc29a54de68fd3f 13814 libnisdb: 'nonnull' argument compared to NULL
-rw-r--r--usr/src/lib/libnisdb/db_headers.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/usr/src/lib/libnisdb/db_headers.h b/usr/src/lib/libnisdb/db_headers.h
index 0707b0c8f9..e3825dbbb6 100644
--- a/usr/src/lib/libnisdb/db_headers.h
+++ b/usr/src/lib/libnisdb/db_headers.h
@@ -142,9 +142,7 @@ extern jmp_buf dbenv;
int lockcode1, lockcode2; \
WRITELOCKNR(this, lockcode2, msg); \
if (lockcode2 != 0) { \
- if (that != 0) { \
- WRITEUNLOCKNR(that, lockcode1, msg); \
- } \
+ WRITEUNLOCKNR(that, lockcode1, msg); \
return (retval); \
} \
}
@@ -152,12 +150,8 @@ extern jmp_buf dbenv;
#define WRITEUNLOCK2(this, that, retval1, retval2, msg1, msg2) \
{ \
int lockcode1 = 0, lockcode2 = 0; \
- if (this != 0) { \
- WRITEUNLOCKNR(this, lockcode1, msg1); \
- } \
- if (that != 0) { \
- WRITEUNLOCKNR(that, lockcode2, msg2); \
- } \
+ WRITEUNLOCKNR(this, lockcode1, msg1); \
+ WRITEUNLOCKNR(that, lockcode2, msg2); \
if (lockcode2 != 0) { \
return (retval2); \
} else if (lockcode1 != 0) { \
@@ -171,9 +165,7 @@ extern jmp_buf dbenv;
int lockcode1, lockcode2; \
READLOCKNR(this, lockcode2, msg); \
if (lockcode2 != 0) { \
- if (that != 0) { \
- READUNLOCKNR(that, lockcode1, msg); \
- } \
+ READUNLOCKNR(that, lockcode1, msg); \
return (retval); \
} \
}
@@ -181,12 +173,8 @@ extern jmp_buf dbenv;
#define READUNLOCK2(this, that, retval1, retval2, msg1, msg2) \
{ \
int lockcode1 = 0, lockcode2 = 0; \
- if (this != 0) { \
- READUNLOCKNR(this, lockcode1, msg1); \
- } \
- if (that != 0) { \
- READUNLOCKNR(that, lockcode2, msg2); \
- } \
+ READUNLOCKNR(this, lockcode1, msg1); \
+ READUNLOCKNR(that, lockcode2, msg2); \
if (lockcode2 != 0) { \
return (retval2); \
} else if (lockcode1 != 0) { \