From f6044c87c021342d68d614d59bc8dacd32d223b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Sep 1998 13:24:20 +0000 Subject: some cleanups to use ZERO_STRUCT() and friends (This used to be commit 7b154dc4313324dfad6cf0117b8ce246bf12bf16) --- source3/lib/signal.c | 2 +- source3/lib/util_hnd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/signal.c b/source3/lib/signal.c index db72b458a7..bb1c6fe189 100644 --- a/source3/lib/signal.c +++ b/source3/lib/signal.c @@ -76,7 +76,7 @@ void CatchSignal(int signum,void (*handler)(int )) #ifdef HAVE_SIGACTION struct sigaction act; - memset(&act, 0, sizeof(act)); + ZERO_STRUCT(act); act.sa_handler = handler; #ifdef SA_RESTART diff --git a/source3/lib/util_hnd.c b/source3/lib/util_hnd.c index addedaec90..b1e695360f 100644 --- a/source3/lib/util_hnd.c +++ b/source3/lib/util_hnd.c @@ -114,7 +114,7 @@ BOOL open_lsa_policy_hnd(POLICY_HND *hnd) return False; } - memset(p, 0, sizeof(*p)); + ZERO_STRUCTP(p); p->open = True; p->pnum = i; @@ -280,7 +280,7 @@ BOOL close_lsa_policy_hnd(POLICY_HND *hnd) bitmap_clear(bmap, p->pnum); - memset(p, 0, sizeof(*p)); + ZERO_STRUCTP(p); free(p); -- cgit