aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-28 01:00:09 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-28 01:00:09 +0000
commit2570b2e5759e8ac32b0922d71056bd426caae9f1 (patch)
tree742bbe33b5ec8ede49147150a2402472172be74b
parentcf26ab70c11416401cd53e6a6a5fb4d5c2583246 (diff)
downloadbusybox-w32-2570b2e5759e8ac32b0922d71056bd426caae9f1.tar.gz
busybox-w32-2570b2e5759e8ac32b0922d71056bd426caae9f1.tar.bz2
busybox-w32-2570b2e5759e8ac32b0922d71056bd426caae9f1.zip
whitespace fixes
-rw-r--r--archival/rpm2cpio.c16
-rw-r--r--libbb/md5.c30
-rw-r--r--miscutils/devfsd.c22
-rw-r--r--networking/ifenslave.c2
-rw-r--r--networking/ip.c10
-rw-r--r--util-linux/getopt.c6
-rw-r--r--util-linux/volume_id/hfs.c2
7 files changed, 42 insertions, 46 deletions
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index 329f8f71d..ee938716f 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -13,14 +13,14 @@
13#define RPM_HEADER_MAGIC "\216\255\350" 13#define RPM_HEADER_MAGIC "\216\255\350"
14 14
15struct rpm_lead { 15struct rpm_lead {
16 unsigned char magic[4]; 16 unsigned char magic[4];
17 uint8_t major, minor; 17 uint8_t major, minor;
18 uint16_t type; 18 uint16_t type;
19 uint16_t archnum; 19 uint16_t archnum;
20 char name[66]; 20 char name[66];
21 uint16_t osnum; 21 uint16_t osnum;
22 uint16_t signature_type; 22 uint16_t signature_type;
23 char reserved[16]; 23 char reserved[16];
24}; 24};
25 25
26struct rpm_header { 26struct rpm_header {
diff --git a/libbb/md5.c b/libbb/md5.c
index 9de37b9e4..56f97270d 100644
--- a/libbb/md5.c
+++ b/libbb/md5.c
@@ -206,15 +206,13 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx)
206 before the computation. To reduce the work for the next steps 206 before the computation. To reduce the work for the next steps
207 we store the swapped words in the array CORRECT_WORDS. */ 207 we store the swapped words in the array CORRECT_WORDS. */
208 208
209# define OP(a, b, c, d, s, T) \ 209# define OP(a, b, c, d, s, T) \
210 do \ 210 do { \
211 { \ 211 a += FF (b, c, d) + (*cwp++ = SWAP_LE32(*words)) + T; \
212 a += FF (b, c, d) + (*cwp++ = SWAP_LE32(*words)) + T; \ 212 ++words; \
213 ++words; \ 213 CYCLIC (a, s); \
214 CYCLIC (a, s); \ 214 a += b; \
215 a += b; \ 215 } while (0)
216 } \
217 while (0)
218 216
219 /* It is unfortunate that C does not provide an operator for 217 /* It is unfortunate that C does not provide an operator for
220 cyclic rotation. Hope the C compiler is smart enough. */ 218 cyclic rotation. Hope the C compiler is smart enough. */
@@ -265,14 +263,12 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx)
265 in CORRECT_WORDS. Redefine the macro to take an additional first 263 in CORRECT_WORDS. Redefine the macro to take an additional first
266 argument specifying the function to use. */ 264 argument specifying the function to use. */
267# undef OP 265# undef OP
268# define OP(f, a, b, c, d, k, s, T) \ 266# define OP(f, a, b, c, d, k, s, T) \
269 do \ 267 do { \
270 { \ 268 a += f (b, c, d) + correct_words[k] + T; \
271 a += f (b, c, d) + correct_words[k] + T; \ 269 CYCLIC (a, s); \
272 CYCLIC (a, s); \ 270 a += b; \
273 a += b; \ 271 } while (0)
274 } \
275 while (0)
276 272
277 /* Round 2. */ 273 /* Round 2. */
278# if MD5_SIZE_VS_SPEED == 1 274# if MD5_SIZE_VS_SPEED == 1
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 1b88f050e..bb6b679b9 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -93,17 +93,17 @@
93/* Never change this otherwise the binary interface will change */ 93/* Never change this otherwise the binary interface will change */
94 94
95struct devfsd_notify_struct 95struct devfsd_notify_struct
96{ /* Use native C types to ensure same types in kernel and user space */ 96{ /* Use native C types to ensure same types in kernel and user space */
97 unsigned int type; /* DEVFSD_NOTIFY_* value */ 97 unsigned int type; /* DEVFSD_NOTIFY_* value */
98 unsigned int mode; /* Mode of the inode or device entry */ 98 unsigned int mode; /* Mode of the inode or device entry */
99 unsigned int major; /* Major number of device entry */ 99 unsigned int major; /* Major number of device entry */
100 unsigned int minor; /* Minor number of device entry */ 100 unsigned int minor; /* Minor number of device entry */
101 unsigned int uid; /* Uid of process, inode or device entry */ 101 unsigned int uid; /* Uid of process, inode or device entry */
102 unsigned int gid; /* Gid of process, inode or device entry */ 102 unsigned int gid; /* Gid of process, inode or device entry */
103 unsigned int overrun_count; /* Number of lost events */ 103 unsigned int overrun_count; /* Number of lost events */
104 unsigned int namelen; /* Number of characters not including '\0' */ 104 unsigned int namelen; /* Number of characters not including '\0' */
105 /* The device name MUST come last */ 105 /* The device name MUST come last */
106 char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */ 106 char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */
107}; 107};
108 108
109#define BUFFER_SIZE 16384 109#define BUFFER_SIZE 16384
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index 875e835e7..b11951758 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -129,7 +129,7 @@ struct globals {
129#define master (G.master ) 129#define master (G.master )
130#define slave (G.slave ) 130#define slave (G.slave )
131#define INIT_G() do { \ 131#define INIT_G() do { \
132 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 132 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
133} while (0) 133} while (0)
134 134
135 135
diff --git a/networking/ip.c b/networking/ip.c
index bb409c5ce..5249217eb 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -39,35 +39,35 @@ static int ip_do(int (*ip_func)(char **argv), char **argv)
39int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 39int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
40int ipaddr_main(int argc ATTRIBUTE_UNUSED, char **argv) 40int ipaddr_main(int argc ATTRIBUTE_UNUSED, char **argv)
41{ 41{
42 return ip_do(do_ipaddr, argv); 42 return ip_do(do_ipaddr, argv);
43} 43}
44#endif 44#endif
45#if ENABLE_FEATURE_IP_LINK 45#if ENABLE_FEATURE_IP_LINK
46int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 46int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
47int iplink_main(int argc ATTRIBUTE_UNUSED, char **argv) 47int iplink_main(int argc ATTRIBUTE_UNUSED, char **argv)
48{ 48{
49 return ip_do(do_iplink, argv); 49 return ip_do(do_iplink, argv);
50} 50}
51#endif 51#endif
52#if ENABLE_FEATURE_IP_ROUTE 52#if ENABLE_FEATURE_IP_ROUTE
53int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 53int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
54int iproute_main(int argc ATTRIBUTE_UNUSED, char **argv) 54int iproute_main(int argc ATTRIBUTE_UNUSED, char **argv)
55{ 55{
56 return ip_do(do_iproute, argv); 56 return ip_do(do_iproute, argv);
57} 57}
58#endif 58#endif
59#if ENABLE_FEATURE_IP_RULE 59#if ENABLE_FEATURE_IP_RULE
60int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 60int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
61int iprule_main(int argc ATTRIBUTE_UNUSED, char **argv) 61int iprule_main(int argc ATTRIBUTE_UNUSED, char **argv)
62{ 62{
63 return ip_do(do_iprule, argv); 63 return ip_do(do_iprule, argv);
64} 64}
65#endif 65#endif
66#if ENABLE_FEATURE_IP_TUNNEL 66#if ENABLE_FEATURE_IP_TUNNEL
67int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 67int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
68int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv) 68int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv)
69{ 69{
70 return ip_do(do_iptunnel, argv); 70 return ip_do(do_iptunnel, argv);
71} 71}
72#endif 72#endif
73 73
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 6ec5cb0cd..2da348176 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -158,10 +158,10 @@ static int generate_output(char **argv, int argc, const char *optstr, const stru
158 158
159 /* Reset getopt(3) (see libbb/getopt32.c for long rant) */ 159 /* Reset getopt(3) (see libbb/getopt32.c for long rant) */
160#ifdef __GLIBC__ 160#ifdef __GLIBC__
161 optind = 0; 161 optind = 0;
162#else /* BSD style */ 162#else /* BSD style */
163 optind = 1; 163 optind = 1;
164 /* optreset = 1; */ 164 /* optreset = 1; */
165#endif 165#endif
166 166
167 while (1) { 167 while (1) {
diff --git a/util-linux/volume_id/hfs.c b/util-linux/volume_id/hfs.c
index a7667f725..79658e4fa 100644
--- a/util-linux/volume_id/hfs.c
+++ b/util-linux/volume_id/hfs.c
@@ -160,7 +160,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off)
160 160
161 buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); 161 buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
162 if (buf == NULL) 162 if (buf == NULL)
163 return -1; 163 return -1;
164 164
165 hfs = (struct hfs_mdb *) buf; 165 hfs = (struct hfs_mdb *) buf;
166 if (hfs->signature[0] != 'B' || hfs->signature[1] != 'D') 166 if (hfs->signature[0] != 'B' || hfs->signature[1] != 'D')