]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkctl: re-cast value stored in Set with INT_TO_PTR()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Jun 2019 05:00:51 +0000 (14:00 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Jun 2019 07:08:55 +0000 (09:08 +0200)
src/network/networkctl.c

index 9c23672ffd65b49c6821a393c74969cdfebf5fe1..a074dae7585bdaf3f0af2782bd7142650ba6c7cd 100644 (file)
@@ -1533,6 +1533,7 @@ static int link_delete(int argc, char *argv[], void *userdata) {
         _cleanup_set_free_ Set *indexes = NULL;
         int index, r, i;
         Iterator j;
+        void *p;
 
         r = sd_netlink_open(&rtnl);
         if (r < 0)
@@ -1552,8 +1553,8 @@ static int link_delete(int argc, char *argv[], void *userdata) {
                         return log_oom();
         }
 
-        SET_FOREACH(index, indexes, j) {
-                r = link_delete_send_message(rtnl, index);
+        SET_FOREACH(p, indexes, j) {
+                r = link_delete_send_message(rtnl, PTR_TO_INT(p));
                 if (r < 0) {
                         char ifname[IF_NAMESIZE + 1];