1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

various: don't use close_nointr if retval is not checked anyway

This commit is contained in:
Mike Yuan 2023-12-28 18:13:37 +08:00
parent 1189815a6b
commit da6c52c57c
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3
3 changed files with 4 additions and 3 deletions

View File

@ -1275,7 +1275,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
_public_ sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m) {
if (m)
(void) close_nointr(MONITOR_TO_FD(m));
(void) close(MONITOR_TO_FD(m));
return NULL;
}

View File

@ -394,7 +394,7 @@ int sd_network_monitor_new(sd_network_monitor **m, const char *category) {
sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
if (m)
(void) close_nointr(MONITOR_TO_FD(m));
(void) close(MONITOR_TO_FD(m));
return NULL;
}

View File

@ -3,6 +3,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <unistd.h>
#include "sd-daemon.h"
@ -71,7 +72,7 @@ void fdset_close(FDSet *s) {
log_debug("Closing set fd %i (%s)", fd, strna(path));
}
(void) close_nointr(fd);
(void) close(fd);
}
}