]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: Use ARRAY_DEL_ELEMENT() in filter_empty_rsrc_stream()
authorVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2020 09:39:24 +0000 (10:39 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 26 Mar 2020 14:43:31 +0000 (14:43 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c

index 2d07d5395241f5db766057df4703c623fc58cea3..65390a8d17704d69cdab1531b42aa2c3b9031959 100644 (file)
@@ -377,11 +377,7 @@ static bool filter_empty_rsrc_stream(unsigned int *num_streams,
        }
 
        TALLOC_FREE(tmp[i].name);
-       if (*num_streams - 1 > i) {
-               memmove(&tmp[i], &tmp[i+1],
-                       (*num_streams - i - 1) * sizeof(struct stream_struct));
-       }
-
+       ARRAY_DEL_ELEMENT(tmp, i, *num_streams);
        *num_streams -= 1;
        return true;
 }