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:
parent
1189815a6b
commit
da6c52c57c
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user