summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udev/udev-event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index ae523f83c5..064873531b 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -472,8 +472,9 @@ static int rename_netif(struct udev_event *event)
sk = socket(PF_INET, SOCK_DGRAM, 0);
if (sk < 0) {
+ err = -errno;
err(event->udev, "error opening socket: %m\n");
- return -errno;
+ return err;
}
memset(&ifr, 0x00, sizeof(struct ifreq));