obj->u.channel.wakeup_fd =
dup(src->u.channel.wakeup_fd);
if (obj->u.channel.wakeup_fd < 0) {
- ret = errno;
+ ret = -errno;
goto chan_error_wakeup_fd;
}
} else {
obj->u.stream.wakeup_fd =
dup(src->u.stream.wakeup_fd);
if (obj->u.stream.wakeup_fd < 0) {
- ret = errno;
+ ret = -errno;
goto stream_error_wakeup_fd;
}
} else {
obj->u.stream.shm_fd =
dup(src->u.stream.shm_fd);
if (obj->u.stream.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto stream_error_shm_fd;
}
} else {
obj->u.counter_global.shm_fd =
dup(src->u.counter_global.shm_fd);
if (obj->u.counter_global.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto error_type;
}
}
obj->u.counter_cpu.shm_fd =
dup(src->u.counter_cpu.shm_fd);
if (obj->u.counter_cpu.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto error_type;
}
}