diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
commit | 86f5c9906beac527f3d7966f24811b571a589e08 (patch) | |
tree | 1c9eba853c728b5d734506e1c66c269d96fe46ea /networking/udhcp | |
parent | 2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff) | |
download | busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.bz2 busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.zip |
- add platform.h.
- use shorter boilerplate while at it.
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/arpping.h | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 18 | ||||
-rw-r--r-- | networking/udhcp/dumpleases.c | 6 |
3 files changed, 9 insertions, 17 deletions
diff --git a/networking/udhcp/arpping.h b/networking/udhcp/arpping.h index 6f27d9f75..30959ca99 100644 --- a/networking/udhcp/arpping.h +++ b/networking/udhcp/arpping.h | |||
@@ -27,7 +27,7 @@ struct arpMsg { | |||
27 | uint8_t tHaddr[6]; /* target's hardware address */ | 27 | uint8_t tHaddr[6]; /* target's hardware address */ |
28 | uint8_t tInaddr[4]; /* target's IP address */ | 28 | uint8_t tInaddr[4]; /* target's IP address */ |
29 | uint8_t pad[18]; /* pad for min. Ethernet payload (60 bytes) */ | 29 | uint8_t pad[18]; /* pad for min. Ethernet payload (60 bytes) */ |
30 | } __attribute__ ((packed)); | 30 | } ATTRIBUTE_PACKED; |
31 | 31 | ||
32 | /* function prototypes */ | 32 | /* function prototypes */ |
33 | int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface); | 33 | int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface); |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index d5c69db42..c4277e3f1 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -4,19 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Russ Dill <Russ.Dill@asu.edu> July 2001 | 5 | * Russ Dill <Russ.Dill@asu.edu> July 2001 |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 8 | */ |
21 | 9 | ||
22 | #include <sys/time.h> | 10 | #include <sys/time.h> |
@@ -74,7 +62,7 @@ struct client_config_t client_config = { | |||
74 | }; | 62 | }; |
75 | 63 | ||
76 | #ifndef IN_BUSYBOX | 64 | #ifndef IN_BUSYBOX |
77 | static void __attribute__ ((noreturn)) show_usage(void) | 65 | static void ATTRIBUTE_NORETURN show_usage(void) |
78 | { | 66 | { |
79 | printf( | 67 | printf( |
80 | "Usage: udhcpc [OPTIONS]\n\n" | 68 | "Usage: udhcpc [OPTIONS]\n\n" |
@@ -101,7 +89,7 @@ static void __attribute__ ((noreturn)) show_usage(void) | |||
101 | } | 89 | } |
102 | #else | 90 | #else |
103 | #define show_usage bb_show_usage | 91 | #define show_usage bb_show_usage |
104 | extern void show_usage(void) __attribute__ ((noreturn)); | 92 | extern void show_usage(void) ATTRIBUTE_NORETURN; |
105 | #endif | 93 | #endif |
106 | 94 | ||
107 | 95 | ||
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index a9036dfbd..ca5c6059e 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -1,3 +1,7 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | ||
4 | */ | ||
1 | #include <fcntl.h> | 5 | #include <fcntl.h> |
2 | #include <string.h> | 6 | #include <string.h> |
3 | #include <stdlib.h> | 7 | #include <stdlib.h> |
@@ -21,7 +25,7 @@ | |||
21 | 25 | ||
22 | 26 | ||
23 | #ifndef IN_BUSYBOX | 27 | #ifndef IN_BUSYBOX |
24 | static void __attribute__ ((noreturn)) show_usage(void) | 28 | static void ATTRIBUTE_NORETURN show_usage(void) |
25 | { | 29 | { |
26 | printf( | 30 | printf( |
27 | "Usage: dumpleases -f <file> -[r|a]\n\n" | 31 | "Usage: dumpleases -f <file> -[r|a]\n\n" |