[PATCH master] Remove duplicate code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The else branches are doing exactly the same as the if branches.
---
 loader/net.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index 46476ea..b0743b2 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -827,12 +827,6 @@ int manualNetConfig(char * device, iface_t * iface,
                 logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
                            strerror(errno));
             }
-        } else if (iface_have_in_addr(&iface->ipaddr)) {
-            if (inet_ntop(AF_INET, &iface->ipaddr, ret,
-                          INET_ADDRSTRLEN) == NULL) {
-                logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
-                           strerror(errno));
-            }
         }
 
         if (*ret) {
@@ -845,12 +839,6 @@ int manualNetConfig(char * device, iface_t * iface,
                 logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
                            strerror(errno));
             }
-        } else if (iface_have_in_addr(&iface->netmask)) {
-            if (inet_ntop(AF_INET, &iface->netmask, ret,
-                          INET_ADDRSTRLEN) == NULL) {
-                logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
-                           strerror(errno));
-            }
         }
 
         if (*ret) {
@@ -894,12 +882,6 @@ int manualNetConfig(char * device, iface_t * iface,
                 logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
                            strerror(errno));
             }
-        } else if (iface_have_in6_addr(&iface->ip6addr)) {
-            if (inet_ntop(AF_INET6, &iface->ip6addr, ret,
-                          INET6_ADDRSTRLEN) == NULL) {
-                logMessage(ERROR, "%s (%d): %s", __func__, __LINE__,
-                           strerror(errno));
-            }
         }
 
         if (*ret) {
-- 
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux