whitespace cleanup
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* very well-known)
|
||||
*
|
||||
* The following function creates a CRC32 table depending on whether
|
||||
* a big-endian (0x04c11db7) or little-endian (0xedb88320) CRC32 is
|
||||
* a big-endian (0x04c11db7) or little-endian (0xedb88320) CRC32 is
|
||||
* required. Admittedly, there are other CRC32 polynomials floating
|
||||
* around, but Busybox doesn't use them.
|
||||
*
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
uint32_t *crc32_filltable(int endian)
|
||||
{
|
||||
|
||||
|
||||
uint32_t *crc_table = xmalloc(256 * sizeof(uint32_t));
|
||||
uint32_t polynomial = endian ? 0x04c11db7 : 0xedb88320;
|
||||
uint32_t c;
|
||||
int i, j;
|
||||
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
c = endian ? (i << 24) : i;
|
||||
for (j = 8; j; j--) {
|
||||
|
@@ -72,7 +72,7 @@ void print_login_issue(const char *issue_file, const char *tty)
|
||||
case 'D':
|
||||
case 'o':
|
||||
c = getdomainname(buf, sizeof(buf) - 1);
|
||||
buf[c >= 0 ? c : 0] = '\0';
|
||||
buf[c >= 0 ? c : 0] = '\0';
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
|
@@ -83,7 +83,7 @@ int set_loop(char **device, const char *file, int offset)
|
||||
bb_loop_info loopinfo;
|
||||
struct stat statbuf;
|
||||
int i, dfd, ffd, mode, rc=-1;
|
||||
|
||||
|
||||
/* Open the file. Barf if this doesn't work. */
|
||||
if((ffd = open(file, mode=O_RDWR))<0 && (ffd = open(file,mode=O_RDONLY))<0)
|
||||
return -errno;
|
||||
|
@@ -440,7 +440,7 @@ void *md5_end(void *resbuf, md5_ctx_t *ctx)
|
||||
/* Process last bytes. */
|
||||
if (buf != ctx->buffer) md5_hash_block(ctx->buffer, ctx);
|
||||
md5_hash_block(buf, ctx);
|
||||
|
||||
|
||||
/* Put result from CTX in first 16 bytes following RESBUF. The result is
|
||||
* always in little endian byte order, so that a byte-wise output yields
|
||||
* to the wanted ASCII representation of the message digest.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2002 Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
|
||||
* Copyright (C) 2003 Glenn L. McGrath
|
||||
* Copyright (C) 2003 Erik Andersen
|
||||
*
|
||||
*
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
*
|
||||
* ---------------------------------------------------------------------------
|
||||
@@ -172,7 +172,7 @@ void *sha1_end(void *resbuf, sha1_ctx_t *ctx)
|
||||
|
||||
for (i = 0; i < SHA1_DIGEST_SIZE; ++i)
|
||||
hval[i] = (unsigned char) (ctx->hash[i >> 2] >> 8 * (~i & 3));
|
||||
|
||||
|
||||
return resbuf;
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,12 @@ static struct signal_name {
|
||||
// SUSv3 says kill must support these, and specifies the numerical values,
|
||||
// http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
|
||||
{"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9},
|
||||
{"ALRM", 14}, {"TERM", 15},
|
||||
{"ALRM", 14}, {"TERM", 15},
|
||||
// And Posix adds the following:
|
||||
{"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1},
|
||||
{"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
|
||||
{"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
|
||||
{"TTOU", SIGTTOU}
|
||||
{"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
|
||||
{"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
|
||||
{"TTOU", SIGTTOU}
|
||||
};
|
||||
|
||||
// Convert signal name to number.
|
||||
|
@@ -489,8 +489,8 @@ void xlisten(int s, int backlog)
|
||||
// xstat() - a stat() which dies on failure with meaningful error message
|
||||
void xstat(char *name, struct stat *stat_buf)
|
||||
{
|
||||
if (stat(name, stat_buf))
|
||||
bb_perror_msg_and_die("Can't stat '%s'", name);
|
||||
if (stat(name, stat_buf))
|
||||
bb_perror_msg_and_die("Can't stat '%s'", name);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user