summaryrefslogtreecommitdiffstats
path: root/ip/iplink.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-12-05 10:10:22 -0800
committerStephen Hemminger <shemminger@osdl.org>2006-12-05 10:10:22 -0800
commitae665a522bd46bea44c5ea84c89c8b1731954170 (patch)
tree523b0a5b51e264ebad295e517606123e9e8e04bd /ip/iplink.c
parent0bf0fbc47e33cc968c1c1d20d938de31e497c753 (diff)
Remove trailing whitespace
Go through source files and remove all trailing whitespace Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Diffstat (limited to 'ip/iplink.c')
-rw-r--r--ip/iplink.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ip/iplink.c b/ip/iplink.c
index ffc9f063..8f82a08b 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -140,8 +140,8 @@ static int set_qlen(const char *dev, int qlen)
return -1;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, dev, IFNAMSIZ);
- ifr.ifr_qlen = qlen;
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+ ifr.ifr_qlen = qlen;
if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) {
perror("SIOCSIFXQLEN");
close(s);
@@ -149,7 +149,7 @@ static int set_qlen(const char *dev, int qlen)
}
close(s);
- return 0;
+ return 0;
}
static int set_mtu(const char *dev, int mtu)
@@ -162,8 +162,8 @@ static int set_mtu(const char *dev, int mtu)
return -1;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, dev, IFNAMSIZ);
- ifr.ifr_mtu = mtu;
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+ ifr.ifr_mtu = mtu;
if (ioctl(s, SIOCSIFMTU, &ifr) < 0) {
perror("SIOCSIFMTU");
close(s);
@@ -171,7 +171,7 @@ static int set_mtu(const char *dev, int mtu)
}
close(s);
- return 0;
+ return 0;
}
static int get_address(const char *dev, int *htype)
@@ -182,7 +182,7 @@ static int get_address(const char *dev, int *htype)
int s;
s = socket(PF_PACKET, SOCK_DGRAM, 0);
- if (s < 0) {
+ if (s < 0) {
perror("socket(PF_PACKET)");
return -1;
}
@@ -216,7 +216,7 @@ static int get_address(const char *dev, int *htype)
return me.sll_halen;
}
-static int parse_address(const char *dev, int hatype, int halen,
+static int parse_address(const char *dev, int hatype, int halen,
char *lla, struct ifreq *ifr)
{
int alen;
@@ -231,7 +231,7 @@ static int parse_address(const char *dev, int hatype, int halen,
fprintf(stderr, "Wrong address (%s) length: expected %d bytes\n", lla, halen);
return -1;
}
- return 0;
+ return 0;
}
static int set_address(struct ifreq *ifr, int brd)
@@ -247,7 +247,7 @@ static int set_address(struct ifreq *ifr, int brd)
return -1;
}
close(s);
- return 0;
+ return 0;
}
@@ -379,7 +379,7 @@ static int do_set(int argc, char **argv)
}
if (newbrd) {
if (parse_address(dev, htype, halen, newbrd, &ifr1) < 0)
- return -1;
+ return -1;
}
}
@@ -388,18 +388,18 @@ static int do_set(int argc, char **argv)
return -1;
dev = newname;
}
- if (qlen != -1) {
+ if (qlen != -1) {
if (set_qlen(dev, qlen) < 0)
- return -1;
+ return -1;
}
- if (mtu != -1) {
+ if (mtu != -1) {
if (set_mtu(dev, mtu) < 0)
- return -1;
+ return -1;
}
if (newaddr || newbrd) {
if (newbrd) {
if (set_address(&ifr1, 1) < 0)
- return -1;
+ return -1;
}
if (newaddr) {
if (set_address(&ifr0, 0) < 0)