+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
#include "sd-netlink.h"
#include "alloc-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
else if (errno == EAGAIN)
log_debug("rtnl: no data in socket");
- return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
+ return IN_SET(errno, EAGAIN, EINTR) ? 0 : -errno;
}
if (sender.nl.nl_pid != 0) {
/* drop the message */
r = recvmsg(fd, &msg, 0);
if (r < 0)
- return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
+ return IN_SET(errno, EAGAIN, EINTR) ? 0 : -errno;
}
return 0;