FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 06-09-2011, 10:11 AM
Radek Vykydal
 
Default Remove duplicate code.

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-09-2011, 12:05 PM
Chris Lumens
 
Default Remove duplicate code.

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

Good catch.

- Chris

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

Thread Tools




All times are GMT. The time now is 12:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org