Skip to content

Commit

Permalink
gdb/testsuite/rocm: fix rocm-multi-inferior-gpu.cpp
Browse files Browse the repository at this point in the history
The gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp testcase contains a
call to execl which does not have NULL as a last argument.  This is
an invalid use of execl.  This patch fixes this oversight.

Change-Id: I03b60abe30468d71ba5089b240c6d00f9b8883b2
Approved-By: Tom Tromey <[email protected]>
(cherry picked from commit aa240fb)
  • Loading branch information
lancesix committed Sep 12, 2023
1 parent f5499c9 commit 7b1d07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ parent (int argc, char **argv)
if (pid == 0)
{
/* Exec to force the child to re-initialize the ROCm runtime. */
if (execl (argv[0], argv[0], n) == -1)
if (execl (argv[0], argv[0], n, nullptr) == -1)
{
perror ("Failed to exec");
return -1;
Expand Down

0 comments on commit 7b1d07a

Please sign in to comment.