style fixes
last xcalloc replaced by xzalloc
This commit is contained in:
@@ -726,7 +726,7 @@ void bb_dump_add(const char *fmt)
|
||||
if (isdigit(*p)) {
|
||||
// TODO: use bb_strtou
|
||||
savep = p;
|
||||
do p++; while(isdigit(*p));
|
||||
do p++; while (isdigit(*p));
|
||||
if (!isspace(*p)) {
|
||||
bb_error_msg_and_die("bad format {%s}", fmt);
|
||||
}
|
||||
|
||||
@@ -17,12 +17,13 @@ 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) {
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
char devpath[PATH_MAX];
|
||||
sprintf(devpath,"/dev/%s", entry->d_name);
|
||||
if(!stat(devpath, &st) && S_ISBLK(st.st_mode) && st.st_rdev == dev) {
|
||||
if (!stat(devpath, &st) && S_ISBLK(st.st_mode) && st.st_rdev == dev) {
|
||||
retpath = xstrdup(devpath);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
do { \
|
||||
t = a; a = rotl32(a,5) + f(b,c,d) + e + k + w[i]; \
|
||||
e = d; d = c; c = rotl32(b, 30); b = t; \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
static void sha1_compile(sha1_ctx_t *ctx)
|
||||
{
|
||||
|
||||
@@ -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,9 +39,9 @@ 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) {
|
||||
while (*argv) {
|
||||
vfork_args[a++] = *argv;
|
||||
argv++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user