From 968cafe21b948e10d5ed605a72f5ce8ad71547d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Mon, 24 Jun 2019 12:07:36 +0000 Subject: [PATCH] Fix errno MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/ctl.c | 2 +- src/iface.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ctl.c b/src/ctl.c index cbc708f..a8cb1d1 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -23,7 +23,7 @@ ctl_reply(int fd, struct ctl_msg *res, struct ctl_msg *req) return -1; if (res->type != req->type || !res->reply) { - errno = EINTR; + errno = EINVAL; return -1; } diff --git a/src/iface.c b/src/iface.c index c39af08..a0644d9 100644 --- a/src/iface.c +++ b/src/iface.c @@ -20,7 +20,7 @@ iface_set_mtu(const char *dev_name, size_t mtu) int ret = snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", dev_name); if (ret <= 0 || (size_t)ret >= sizeof(ifr.ifr_name)) { - errno = EINTR; + errno = EINVAL; return -1; }