summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-01-14 13:41:28 +0100
committerMartin Nagy <mnagy@redhat.com>2009-01-14 13:41:28 +0100
commit6d177496bbb19a069d8a5af9a28e31e43c591c09 (patch)
tree53a333e75abd7a0fdfb3681b32499b2156fbea98 /util.h
parent55cd3891797573e07daba831514c73f94a5831ac (diff)
downloadldap_driver_testing-6d177496bbb19a069d8a5af9a28e31e43c591c09.tar.gz
ldap_driver_testing-6d177496bbb19a069d8a5af9a28e31e43c591c09.tar.xz
ldap_driver_testing-6d177496bbb19a069d8a5af9a28e31e43c591c09.zip
Few small changes for semaphore.c and util.h.
Add a ZERO_PTR() macro in util.h. semaphore_destroy() will now ignore NULL pointers.
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index 470d3fd..28e42ba 100644
--- a/util.h
+++ b/util.h
@@ -25,4 +25,6 @@
if (result != ISC_R_SUCCESS) goto cleanup; \
} while (0)
+#define ZERO_PTR(ptr, type) memset((ptr), 0, sizeof(type))
+
#endif /* !_LD_UTIL_H_ */