style fixes

last xcalloc replaced by xzalloc
This commit is contained in:
Denis Vlasenko 2006-12-26 10:42:51 +00:00
parent 5dd7ef0f37
commit bf0a201008
39 changed files with 114 additions and 118 deletions

View File

@ -1279,7 +1279,6 @@ static void chain_group(void)
/* delete, next, nextfile, return, exit */
default:
chain_expr(t.info);
}
}
}

View File

@ -173,7 +173,7 @@ static void loop_forever(void)
#if ENABLE_DEBUG_INIT
#define messageD message
#else
#define messageD(...) do {;} while(0);
#define messageD(...) do {} while (0)
#endif
static void message(int device, const char *fmt, ...)
__attribute__ ((format(printf, 2, 3)));

View File

@ -17,7 +17,8 @@ char *find_block_device(char *path)
dev_t dev;
char *retpath=NULL;
if(stat(path, &st) || !(dir = opendir("/dev"))) return NULL;
if (stat(path, &st) || !(dir = opendir("/dev")))
return NULL;
dev = (st.st_mode & S_IFMT) == S_IFBLK ? st.st_rdev : st.st_dev;
while ((entry = readdir(dir)) != NULL) {
char devpath[PATH_MAX];

View File

@ -15,13 +15,9 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <paths.h>
#include "libbb.h"
#ifdef BB_NOMMU
void vfork_daemon_rexec(int nochdir, int noclose,
int argc, char **argv, char *foreground_opt)
@ -43,7 +39,7 @@ void vfork_daemon_rexec(int nochdir, int noclose,
close(fd);
}
vfork_args = xcalloc(sizeof(char *), argc + 3);
vfork_args = xzalloc(sizeof(char *) * (argc + 3));
vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH;
while (*argv) {
vfork_args[a++] = *argv;

View File

@ -2043,10 +2043,10 @@ static void identify_from_stdin(void)
// Convert the newline-separated hex data into an identify block.
for (i = 0; i<256; i++)
{
for (i = 0; i<256; i++) {
int j;
for(j=0;j<4;j++) sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++));
for (j = 0; j < 4; j++)
sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++));
}
// Parse the data.