use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for
authorAndrew Tridgell <tridge@samba.org>
Wed, 26 Aug 1998 03:06:48 +0000 (03:06 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 26 Aug 1998 03:06:48 +0000 (03:06 +0000)
arrays. This prevents (harmless) warnings from some compilers

source/include/smb.h
source/lsarpcd/srv_lsa.c
source/rpc_server/srv_lsa.c

index 00c5464251c8fde0b41bc7163041d3431ca30593..31e3b645b1106df0f7bfc998056e67fad9409107 100644 (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")))
index 0675743eee855d8a0715b2273b89183f04bd0a96..35ceeace04f560b29510d905f4d431d4d330cf9a 100644 (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);
index 0675743eee855d8a0715b2273b89183f04bd0a96..35ceeace04f560b29510d905f4d431d4d330cf9a 100644 (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);