test: wrong pointer arithmetic multiplier
PR-URL: https://github.com/libuv/libuv/pull/3216 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
parent
9ec6bb914f
commit
592cd40af8
@ -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) {
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user