1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for

arrays. This prevents (harmless) warnings from some compilers
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent afe98165a2
commit c2da46d1d0
3 changed files with 3 additions and 2 deletions

View File

@ -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")))

View File

@ -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);

View File

@ -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);