diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-29 15:15:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 22:24:16 -0400 |
commit | 4299c8a94fa9d26b54222d7781244137623d4b39 (patch) | |
tree | acb059dbb51d5d83b5dedaf074256aba3d7fba80 /net | |
parent | b438f940d3541f478c6b37106ed095f1be7959ef (diff) |
net: remove an unneeded check
"ifa->ifa_label" is an array inside the in_ifaddr struct. It can never
be NULL so we can remove this check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/devinet.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 8d48c392adcc..1b7f7ae8514a 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1124,10 +1124,7 @@ static int inet_gifconf(struct net_device *dev, char __user *buf, int len) | |||
1124 | if (len < (int) sizeof(ifr)) | 1124 | if (len < (int) sizeof(ifr)) |
1125 | break; | 1125 | break; |
1126 | memset(&ifr, 0, sizeof(struct ifreq)); | 1126 | memset(&ifr, 0, sizeof(struct ifreq)); |
1127 | if (ifa->ifa_label) | 1127 | strcpy(ifr.ifr_name, ifa->ifa_label); |
1128 | strcpy(ifr.ifr_name, ifa->ifa_label); | ||
1129 | else | ||
1130 | strcpy(ifr.ifr_name, dev->name); | ||
1131 | 1128 | ||
1132 | (*(struct sockaddr_in *)&ifr.ifr_addr).sin_family = AF_INET; | 1129 | (*(struct sockaddr_in *)&ifr.ifr_addr).sin_family = AF_INET; |
1133 | (*(struct sockaddr_in *)&ifr.ifr_addr).sin_addr.s_addr = | 1130 | (*(struct sockaddr_in *)&ifr.ifr_addr).sin_addr.s_addr = |