From: Yu Watanabe Date: Wed, 31 Jul 2024 03:23:40 +0000 (+0900) Subject: sd-device-monitor: replace -1 with -EBADF X-Git-Tag: v257-rc1~772^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf1283c1fb700a2227c815c6320f72cbca0b1850;p=thirdparty%2Fsystemd.git sd-device-monitor: replace -1 with -EBADF --- diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c index a7ef03abac2..5845932188e 100644 --- a/src/libsystemd/sd-device/device-monitor.c +++ b/src/libsystemd/sd-device/device-monitor.c @@ -231,13 +231,13 @@ fail: /* Let's unset the socket fd in the monitor object before we destroy it so that the fd passed in is * not closed on failure. */ if (fd >= 0) - m->sock = -1; + m->sock = -EBADF; return r; } _public_ int sd_device_monitor_new(sd_device_monitor **ret) { - return device_monitor_new_full(ret, MONITOR_GROUP_UDEV, -1); + return device_monitor_new_full(ret, MONITOR_GROUP_UDEV, -EBADF); } _public_ int sd_device_monitor_stop(sd_device_monitor *m) {