tdbtorture: Use ARRAY_DEL_ELEMENT()
authorVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2020 10:15:28 +0000 (11:15 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 26 Mar 2020 16:22:00 +0000 (16:22 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Mar 26 16:22:00 UTC 2020 on sn-devel-184

lib/tdb/tools/tdbtorture.c

index 7d08d4f677547b48f8546d328dea05f82164c69b..1063f14f4ccb7046b5d3e769ad6c385c4a27ba20 100644 (file)
@@ -467,8 +467,7 @@ int main(int argc, char * const *argv)
                                error_count++;
                        }
                }
-               memmove(&pids[j], &pids[j+1],
-                       (num_procs - j - 1)*sizeof(pids[0]));
+               ARRAY_DEL_ELEMENT(pids, j, num_procs);
                num_procs--;
        }