diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-27 02:18:37 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-27 02:18:37 +0000 |
commit | 538fbb7ad0fab7c36259038ab4a7e937b4d85c36 (patch) | |
tree | c20e5881b32cfaeaa1b0797ff1690345738f5432 /source3/rpc_parse | |
parent | ef2de912f2c0b095ea19986b3dce6b1b8a0ea8b5 (diff) | |
download | samba-538fbb7ad0fab7c36259038ab4a7e937b4d85c36.tar.gz samba-538fbb7ad0fab7c36259038ab4a7e937b4d85c36.tar.bz2 samba-538fbb7ad0fab7c36259038ab4a7e937b4d85c36.zip |
As prs_alloc_mem now zeros memory, remove superfluous memsets after it.
Jeremy.
(This used to be commit 94fdffb3557fa68d634d6c402751f5bcb1f6a656)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 2 | ||||
-rw-r--r-- | source3/rpc_parse/parse_sec.c | 6 | ||||
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 5 |
3 files changed, 0 insertions, 13 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 6f23058c1d..56d03daf18 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -584,7 +584,6 @@ BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 * str->buffer = (uint16 *)prs_alloc_mem(ps,str->buf_len * sizeof(uint16)); if (str->buffer == NULL) return False; - memset(str->buffer, '\0', str->buf_len * sizeof(uint16)); } /* If the string is empty, we don't have anything to stream */ @@ -678,7 +677,6 @@ BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 * str->buffer = (uint16 *)prs_alloc_mem(ps,str->uni_max_len * sizeof(uint16)); if (str->buffer == NULL) return False; - memset(str->buffer, '\0', str->uni_max_len * sizeof(uint16)); } /* If the string is empty, we don't have anything to stream */ diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index 1e83b175cc..fa0be04cba 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -206,7 +206,6 @@ BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) */ if((psa = (SEC_ACL *)malloc(sizeof(SEC_ACL))) == NULL) return False; - ZERO_STRUCTP(psa); *ppsa = psa; } @@ -231,7 +230,6 @@ BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) /* reading */ if((psa->ace = malloc(sizeof(psa->ace[0]) * psa->num_aces)) == NULL) return False; - ZERO_STRUCTP(psa->ace); } for (i = 0; i < psa->num_aces; i++) { @@ -633,7 +631,6 @@ BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth) if(UNMARSHALLING(ps)) { if((psd = (SEC_DESC *)malloc(sizeof(SEC_DESC))) == NULL) return False; - ZERO_STRUCTP(psd); *ppsd = psd; } else { /* Marshalling - just ignore. */ @@ -678,7 +675,6 @@ BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth) /* reading */ if((psd->owner_sid = malloc(sizeof(*psd->owner_sid))) == NULL) return False; - ZERO_STRUCTP(psd->owner_sid); } if(!smb_io_dom_sid("owner_sid ", psd->owner_sid , ps, depth)) @@ -697,7 +693,6 @@ BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth) return False; if((psd->grp_sid = malloc(sizeof(*psd->grp_sid))) == NULL) return False; - ZERO_STRUCTP(psd->grp_sid); } if(!smb_io_dom_sid("grp_sid", psd->grp_sid, ps, depth)) @@ -810,7 +805,6 @@ BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth if (UNMARSHALLING(ps) && psdb == NULL) { if((psdb = (SEC_DESC_BUF *)malloc(sizeof(SEC_DESC_BUF))) == NULL) return False; - ZERO_STRUCTP(psdb); *ppsdb = psdb; } diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 1721b6f187..3db3161ed5 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -293,7 +293,6 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct if (UNMARSHALLING(ps)) { if (!(info1 = (SRV_SHARE_INFO_1 *)prs_alloc_mem(ps, num_entries * sizeof(SRV_SHARE_INFO_1)))) return False; - memset(info1, '\0', num_entries * sizeof(SRV_SHARE_INFO_1)); ctr->share.info1 = info1; } @@ -319,7 +318,6 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct if (UNMARSHALLING(ps)) { if (!(info2 = (SRV_SHARE_INFO_2 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_2)))) return False; - memset(info2, '\0', num_entries * sizeof(SRV_SHARE_INFO_2)); ctr->share.info2 = info2; } @@ -807,7 +805,6 @@ static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_stru ctr = *pp_ctr = (SRV_SESS_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_SESS_INFO_CTR)); if (ctr == NULL) return False; - ZERO_STRUCTP(ctr); } if (ctr == NULL) @@ -1173,7 +1170,6 @@ static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_stru ctr = *pp_ctr = (SRV_CONN_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_CONN_INFO_CTR)); if (ctr == NULL) return False; - ZERO_STRUCTP(ctr); } if (ctr == NULL) @@ -1453,7 +1449,6 @@ static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR **pp_ctr, prs_stru ctr = *pp_ctr = (SRV_FILE_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_FILE_INFO_CTR)); if (ctr == NULL) return False; - ZERO_STRUCTP(ctr); } if (ctr == NULL) |