Skip to content

Commit

Permalink
test: wrong pointer arithmetic multiplier
Browse files Browse the repository at this point in the history
PR-URL: libuv#3216
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Jameson Nash <[email protected]>
  • Loading branch information
rexes-ND authored Jul 1, 2021
1 parent 9ec6bb9 commit 592cd40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runner-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void* dowait(void* data) {
process_info_t* p;

for (i = 0; i < args->n; i++) {
p = (process_info_t*)(args->vec + i * sizeof(process_info_t));
p = &args->vec[i];
if (p->terminated) continue;
r = waitpid(p->pid, &p->status, 0);
if (r < 0) {
Expand Down Expand Up @@ -323,7 +323,7 @@ int process_wait(process_info_t* vec, int n, int timeout) {
} else {
/* Timeout. Kill all the children. */
for (i = 0; i < n; i++) {
p = (process_info_t*)(vec + i * sizeof(process_info_t));
p = &vec[i];
kill(p->pid, SIGTERM);
}
retval = -2;
Expand Down

0 comments on commit 592cd40

Please sign in to comment.