diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-02-16 16:36:01 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-02-16 16:36:01 +0900 |
commit | 8de1c191058cb7731ce560ed024d5fd122750630 (patch) | |
tree | 9791bf47bb786f9f0de80b2ca322c474fa703cf3 /acls.c | |
parent | 3166d85224e74e23851181ac5bd070ca9679ce74 (diff) | |
download | rsync-8de1c191058cb7731ce560ed024d5fd122750630.tar.gz rsync-8de1c191058cb7731ce560ed024d5fd122750630.tar.bz2 rsync-8de1c191058cb7731ce560ed024d5fd122750630.zip |
Imported Upstream version 3.2.2upstream/3.2.2
Diffstat (limited to 'acls.c')
-rw-r--r-- | acls.c | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -168,8 +168,6 @@ static rsync_acl *create_racl(void) { rsync_acl *racl = new(rsync_acl); - if (!racl) - out_of_memory("create_racl"); *racl = empty_rsync_acl; return racl; @@ -335,8 +333,7 @@ static BOOL unpack_smb_acl(SMB_ACL_T sacl, rsync_acl *racl) qsort(temp_ida_list.items, temp_ida_list.count, sizeof (id_access), id_access_sorter); } #endif - if (!(racl->names.idas = new_array(id_access, temp_ida_list.count))) - out_of_memory("unpack_smb_acl"); + racl->names.idas = new_array(id_access, temp_ida_list.count); memcpy(racl->names.idas, temp_ida_list.items, temp_ida_list.count * sizeof (id_access)); } else racl->names.idas = NULL; @@ -505,9 +502,7 @@ static int get_rsync_acl(const char *fname, rsync_acl *racl, if (cnt) { char *bp = buf + 4*4; - id_access *ida; - if (!(ida = racl->names.idas = new_array(id_access, cnt))) - out_of_memory("get_rsync_acl"); + id_access *ida = racl->names.idas = new_array(id_access, cnt); racl->names.count = cnt; for ( ; cnt--; ida++, bp += 4+4) { ida->id = IVAL(bp, 0); @@ -703,12 +698,7 @@ static uchar recv_ida_entries(int f, ida_entries *ent) uchar computed_mask_bits = 0; int i, count = read_varint(f); - if (count) { - if (!(ent->idas = new_array(id_access, count))) - out_of_memory("recv_ida_entries"); - } else - ent->idas = NULL; - + ent->idas = count ? new_array(id_access, count) : NULL; ent->count = count; for (i = 0; i < count; i++) { |