git.samba.org
/
nss_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cce021a
)
nwrap: Add MIN(), MAX() macros
author
Pavel Filipenský
<pfilipensky@samba.org>
Tue, 17 Jan 2023 06:21:34 +0000
(07:21 +0100)
committer
Andreas Schneider
<asn@samba.org>
Tue, 24 Jan 2023 08:56:35 +0000
(09:56 +0100)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/nss_wrapper.c
patch
|
blob
|
history
diff --git
a/src/nss_wrapper.c
b/src/nss_wrapper.c
index 030e5bd32680c89c01882c8daf6ed30a0c8fe617..ffa36580d7ed87823cef8b5e9d43acff9e6ff60a 100644
(file)
--- a/
src/nss_wrapper.c
+++ b/
src/nss_wrapper.c
@@
-177,6
+177,9
@@
typedef nss_status_t NSS_STATUS;
#define NWRAP_INET_ADDRSTRLEN INET_ADDRSTRLEN
#endif
+#define MAX(a,b) ((a) < (b) ? (b) : (a))
+#define MIN(a,b) ((a) > (b) ? (b) : (a))
+
static bool nwrap_initialized = false;
static pthread_mutex_t nwrap_initialized_mutex = PTHREAD_MUTEX_INITIALIZER;