aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-17 16:28:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-17 16:28:10 +0000
commit9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e (patch)
tree94c3c0678d1349497abe2db6004e9331e50f6d37 /libbb
parenta6127aacef047ed7661722705b052811fbe7f467 (diff)
downloadbusybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.tar.gz
busybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.tar.bz2
busybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.zip
whitespace cleanup
Diffstat (limited to 'libbb')
-rw-r--r--libbb/crc32.c6
-rw-r--r--libbb/login.c2
-rw-r--r--libbb/loop.c2
-rw-r--r--libbb/md5.c2
-rw-r--r--libbb/sha1.c4
-rw-r--r--libbb/u_signal_names.c8
-rw-r--r--libbb/xfuncs.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/libbb/crc32.c b/libbb/crc32.c
index 538a13622..1e4a57e8a 100644
--- a/libbb/crc32.c
+++ b/libbb/crc32.c
@@ -6,7 +6,7 @@
6 * very well-known) 6 * very well-known)
7 * 7 *
8 * The following function creates a CRC32 table depending on whether 8 * The following function creates a CRC32 table depending on whether
9 * a big-endian (0x04c11db7) or little-endian (0xedb88320) CRC32 is 9 * a big-endian (0x04c11db7) or little-endian (0xedb88320) CRC32 is
10 * required. Admittedly, there are other CRC32 polynomials floating 10 * required. Admittedly, there are other CRC32 polynomials floating
11 * around, but Busybox doesn't use them. 11 * around, but Busybox doesn't use them.
12 * 12 *
@@ -18,12 +18,12 @@
18 18
19uint32_t *crc32_filltable(int endian) 19uint32_t *crc32_filltable(int endian)
20{ 20{
21 21
22 uint32_t *crc_table = xmalloc(256 * sizeof(uint32_t)); 22 uint32_t *crc_table = xmalloc(256 * sizeof(uint32_t));
23 uint32_t polynomial = endian ? 0x04c11db7 : 0xedb88320; 23 uint32_t polynomial = endian ? 0x04c11db7 : 0xedb88320;
24 uint32_t c; 24 uint32_t c;
25 int i, j; 25 int i, j;
26 26
27 for (i = 0; i < 256; i++) { 27 for (i = 0; i < 256; i++) {
28 c = endian ? (i << 24) : i; 28 c = endian ? (i << 24) : i;
29 for (j = 8; j; j--) { 29 for (j = 8; j; j--) {
diff --git a/libbb/login.c b/libbb/login.c
index a7f8de41f..646995b0b 100644
--- a/libbb/login.c
+++ b/libbb/login.c
@@ -72,7 +72,7 @@ void print_login_issue(const char *issue_file, const char *tty)
72 case 'D': 72 case 'D':
73 case 'o': 73 case 'o':
74 c = getdomainname(buf, sizeof(buf) - 1); 74 c = getdomainname(buf, sizeof(buf) - 1);
75 buf[c >= 0 ? c : 0] = '\0'; 75 buf[c >= 0 ? c : 0] = '\0';
76 break; 76 break;
77 77
78 case 'd': 78 case 'd':
diff --git a/libbb/loop.c b/libbb/loop.c
index da41d1e76..d22b39800 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -83,7 +83,7 @@ int set_loop(char **device, const char *file, int offset)
83 bb_loop_info loopinfo; 83 bb_loop_info loopinfo;
84 struct stat statbuf; 84 struct stat statbuf;
85 int i, dfd, ffd, mode, rc=-1; 85 int i, dfd, ffd, mode, rc=-1;
86 86
87 /* Open the file. Barf if this doesn't work. */ 87 /* Open the file. Barf if this doesn't work. */
88 if((ffd = open(file, mode=O_RDWR))<0 && (ffd = open(file,mode=O_RDONLY))<0) 88 if((ffd = open(file, mode=O_RDWR))<0 && (ffd = open(file,mode=O_RDONLY))<0)
89 return -errno; 89 return -errno;
diff --git a/libbb/md5.c b/libbb/md5.c
index cfdffe835..132efdf93 100644
--- a/libbb/md5.c
+++ b/libbb/md5.c
@@ -440,7 +440,7 @@ void *md5_end(void *resbuf, md5_ctx_t *ctx)
440 /* Process last bytes. */ 440 /* Process last bytes. */
441 if (buf != ctx->buffer) md5_hash_block(ctx->buffer, ctx); 441 if (buf != ctx->buffer) md5_hash_block(ctx->buffer, ctx);
442 md5_hash_block(buf, ctx); 442 md5_hash_block(buf, ctx);
443 443
444 /* Put result from CTX in first 16 bytes following RESBUF. The result is 444 /* Put result from CTX in first 16 bytes following RESBUF. The result is
445 * always in little endian byte order, so that a byte-wise output yields 445 * always in little endian byte order, so that a byte-wise output yields
446 * to the wanted ASCII representation of the message digest. 446 * to the wanted ASCII representation of the message digest.
diff --git a/libbb/sha1.c b/libbb/sha1.c
index ea4da2474..a86218b25 100644
--- a/libbb/sha1.c
+++ b/libbb/sha1.c
@@ -6,7 +6,7 @@
6 * Copyright (C) 2002 Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK. 6 * Copyright (C) 2002 Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
7 * Copyright (C) 2003 Glenn L. McGrath 7 * Copyright (C) 2003 Glenn L. McGrath
8 * Copyright (C) 2003 Erik Andersen 8 * Copyright (C) 2003 Erik Andersen
9 * 9 *
10 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 10 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
11 * 11 *
12 * --------------------------------------------------------------------------- 12 * ---------------------------------------------------------------------------
@@ -172,7 +172,7 @@ void *sha1_end(void *resbuf, sha1_ctx_t *ctx)
172 172
173 for (i = 0; i < SHA1_DIGEST_SIZE; ++i) 173 for (i = 0; i < SHA1_DIGEST_SIZE; ++i)
174 hval[i] = (unsigned char) (ctx->hash[i >> 2] >> 8 * (~i & 3)); 174 hval[i] = (unsigned char) (ctx->hash[i >> 2] >> 8 * (~i & 3));
175 175
176 return resbuf; 176 return resbuf;
177} 177}
178 178
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index 62fab810d..b9afc6ff1 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -16,12 +16,12 @@ static struct signal_name {
16 // SUSv3 says kill must support these, and specifies the numerical values, 16 // SUSv3 says kill must support these, and specifies the numerical values,
17 // http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html 17 // http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
18 {"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9}, 18 {"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9},
19 {"ALRM", 14}, {"TERM", 15}, 19 {"ALRM", 14}, {"TERM", 15},
20 // And Posix adds the following: 20 // And Posix adds the following:
21 {"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1}, 21 {"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1},
22 {"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD}, 22 {"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
23 {"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN}, 23 {"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
24 {"TTOU", SIGTTOU} 24 {"TTOU", SIGTTOU}
25}; 25};
26 26
27// Convert signal name to number. 27// Convert signal name to number.
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 3baf7b251..d77bf3839 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -489,8 +489,8 @@ void xlisten(int s, int backlog)
489// xstat() - a stat() which dies on failure with meaningful error message 489// xstat() - a stat() which dies on failure with meaningful error message
490void xstat(char *name, struct stat *stat_buf) 490void xstat(char *name, struct stat *stat_buf)
491{ 491{
492 if (stat(name, stat_buf)) 492 if (stat(name, stat_buf))
493 bb_perror_msg_and_die("Can't stat '%s'", name); 493 bb_perror_msg_and_die("Can't stat '%s'", name);
494} 494}
495#endif 495#endif
496 496