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:
Erkhes N 2021-07-01 12:24:35 +09:00 committed by GitHub
parent 9ec6bb914f
commit 592cd40af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;