From c2da46d1d0820a86e7f77506563cfe7f67b08fee Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 Aug 1998 03:06:48 +0000 Subject: [PATCH] use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for arrays. This prevents (harmless) warnings from some compilers --- source/include/smb.h | 1 + source/lsarpcd/srv_lsa.c | 2 +- source/rpc_server/srv_lsa.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/include/smb.h b/source/include/smb.h index 00c5464251c..31e3b645b11 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -1562,6 +1562,7 @@ extern int unix_ERR_code; /* useful macros */ #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) +#define ZERO_ARRAY(x) memset((char *)(x), 0, sizeof(x)) #define SMB_ASSERT(b) ((b)?(void)0: \ (DEBUG(0,("PANIC: assert failed at %s(%d)\n", \ __FILE__, __LINE__)), smb_panic("assert failed"))) diff --git a/source/lsarpcd/srv_lsa.c b/source/lsarpcd/srv_lsa.c index 0675743eee8..35ceeace04f 100644 --- a/source/lsarpcd/srv_lsa.c +++ b/source/lsarpcd/srv_lsa.c @@ -392,7 +392,7 @@ static void api_lsa_lookup_names( int uid, prs_struct *data, ZERO_STRUCT(sid_S_1_1); ZERO_STRUCT(sid_S_1_3); ZERO_STRUCT(sid_S_1_5); - ZERO_STRUCT(dom_rids); + ZERO_ARRAY(dom_rids); /* grab the info class and policy handle */ lsa_io_q_lookup_rids("", &q_l, data, 0); diff --git a/source/rpc_server/srv_lsa.c b/source/rpc_server/srv_lsa.c index 0675743eee8..35ceeace04f 100644 --- a/source/rpc_server/srv_lsa.c +++ b/source/rpc_server/srv_lsa.c @@ -392,7 +392,7 @@ static void api_lsa_lookup_names( int uid, prs_struct *data, ZERO_STRUCT(sid_S_1_1); ZERO_STRUCT(sid_S_1_3); ZERO_STRUCT(sid_S_1_5); - ZERO_STRUCT(dom_rids); + ZERO_ARRAY(dom_rids); /* grab the info class and policy handle */ lsa_io_q_lookup_rids("", &q_l, data, 0);