X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=2dbac411876bbaabefdacfafad896daf06e70363;hb=2a2febe2ad7dae85101a679033b2d9b4b5926440;hp=39860ebf011870e7a9601f72d8f3b996c3e4cdc1;hpb=4c308bbd7313014c58a5ed28a88b9b39939e8729;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 39860ebf..2dbac411 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -915,7 +915,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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 { @@ -951,7 +951,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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 { @@ -963,7 +963,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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 {