networkctl: fix error message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 8 Sep 2019 09:32:54 +0000 (18:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Oct 2019 05:20:48 +0000 (14:20 +0900)
src/network/networkctl.c

index 5f90e49..64778d6 100644 (file)
@@ -1759,7 +1759,8 @@ static int link_delete(int argc, char *argv[], void *userdata) {
         }
 
         SET_FOREACH(p, indexes, j) {
-                r = link_delete_send_message(rtnl, PTR_TO_INT(p));
+                index = PTR_TO_INT(p);
+                r = link_delete_send_message(rtnl, index);
                 if (r < 0) {
                         char ifname[IF_NAMESIZE + 1];