diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /networking/libiproute/iplink.c | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2 busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'networking/libiproute/iplink.c')
-rw-r--r-- | networking/libiproute/iplink.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index daab6938d..44b546d59 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -128,8 +128,8 @@ static int set_qlen(char *dev, int qlen) | |||
128 | return -1; | 128 | return -1; |
129 | 129 | ||
130 | memset(&ifr, 0, sizeof(ifr)); | 130 | memset(&ifr, 0, sizeof(ifr)); |
131 | strcpy(ifr.ifr_name, dev); | 131 | strcpy(ifr.ifr_name, dev); |
132 | ifr.ifr_qlen = qlen; | 132 | ifr.ifr_qlen = qlen; |
133 | if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) { | 133 | if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) { |
134 | perror("SIOCSIFXQLEN"); | 134 | perror("SIOCSIFXQLEN"); |
135 | close(s); | 135 | close(s); |
@@ -137,7 +137,7 @@ static int set_qlen(char *dev, int qlen) | |||
137 | } | 137 | } |
138 | close(s); | 138 | close(s); |
139 | 139 | ||
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
143 | static int set_mtu(char *dev, int mtu) | 143 | static int set_mtu(char *dev, int mtu) |
@@ -150,8 +150,8 @@ static int set_mtu(char *dev, int mtu) | |||
150 | return -1; | 150 | return -1; |
151 | 151 | ||
152 | memset(&ifr, 0, sizeof(ifr)); | 152 | memset(&ifr, 0, sizeof(ifr)); |
153 | strcpy(ifr.ifr_name, dev); | 153 | strcpy(ifr.ifr_name, dev); |
154 | ifr.ifr_mtu = mtu; | 154 | ifr.ifr_mtu = mtu; |
155 | if (ioctl(s, SIOCSIFMTU, &ifr) < 0) { | 155 | if (ioctl(s, SIOCSIFMTU, &ifr) < 0) { |
156 | perror("SIOCSIFMTU"); | 156 | perror("SIOCSIFMTU"); |
157 | close(s); | 157 | close(s); |
@@ -159,7 +159,7 @@ static int set_mtu(char *dev, int mtu) | |||
159 | } | 159 | } |
160 | close(s); | 160 | close(s); |
161 | 161 | ||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
165 | static int get_address(char *dev, int *htype) | 165 | static int get_address(char *dev, int *htype) |
@@ -170,7 +170,7 @@ static int get_address(char *dev, int *htype) | |||
170 | int s; | 170 | int s; |
171 | 171 | ||
172 | s = socket(PF_PACKET, SOCK_DGRAM, 0); | 172 | s = socket(PF_PACKET, SOCK_DGRAM, 0); |
173 | if (s < 0) { | 173 | if (s < 0) { |
174 | perror("socket(PF_PACKET)"); | 174 | perror("socket(PF_PACKET)"); |
175 | return -1; | 175 | return -1; |
176 | } | 176 | } |
@@ -218,7 +218,7 @@ static int parse_address(char *dev, int hatype, int halen, char *lla, struct ifr | |||
218 | bb_error_msg("Wrong address (%s) length: expected %d bytes", lla, halen); | 218 | bb_error_msg("Wrong address (%s) length: expected %d bytes", lla, halen); |
219 | return -1; | 219 | return -1; |
220 | } | 220 | } |
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | 223 | ||
224 | static int set_address(struct ifreq *ifr, int brd) | 224 | static int set_address(struct ifreq *ifr, int brd) |
@@ -234,7 +234,7 @@ static int set_address(struct ifreq *ifr, int brd) | |||
234 | return -1; | 234 | return -1; |
235 | } | 235 | } |
236 | close(s); | 236 | close(s); |
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | 240 | ||
@@ -311,7 +311,7 @@ static int do_set(int argc, char **argv) | |||
311 | } | 311 | } |
312 | if (newbrd) { | 312 | if (newbrd) { |
313 | if (parse_address(dev, htype, halen, newbrd, &ifr1) < 0) | 313 | if (parse_address(dev, htype, halen, newbrd, &ifr1) < 0) |
314 | return -1; | 314 | return -1; |
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
@@ -320,18 +320,18 @@ static int do_set(int argc, char **argv) | |||
320 | return -1; | 320 | return -1; |
321 | dev = newname; | 321 | dev = newname; |
322 | } | 322 | } |
323 | if (qlen != -1) { | 323 | if (qlen != -1) { |
324 | if (set_qlen(dev, qlen) < 0) | 324 | if (set_qlen(dev, qlen) < 0) |
325 | return -1; | 325 | return -1; |
326 | } | 326 | } |
327 | if (mtu != -1) { | 327 | if (mtu != -1) { |
328 | if (set_mtu(dev, mtu) < 0) | 328 | if (set_mtu(dev, mtu) < 0) |
329 | return -1; | 329 | return -1; |
330 | } | 330 | } |
331 | if (newaddr || newbrd) { | 331 | if (newaddr || newbrd) { |
332 | if (newbrd) { | 332 | if (newbrd) { |
333 | if (set_address(&ifr1, 1) < 0) | 333 | if (set_address(&ifr1, 1) < 0) |
334 | return -1; | 334 | return -1; |
335 | } | 335 | } |
336 | if (newaddr) { | 336 | if (newaddr) { |
337 | if (set_address(&ifr0, 0) < 0) | 337 | if (set_address(&ifr0, 0) < 0) |