style fixes
last xcalloc replaced by xzalloc
This commit is contained in:
@ -1279,7 +1279,6 @@ static void chain_group(void)
|
|||||||
/* delete, next, nextfile, return, exit */
|
/* delete, next, nextfile, return, exit */
|
||||||
default:
|
default:
|
||||||
chain_expr(t.info);
|
chain_expr(t.info);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ static void loop_forever(void)
|
|||||||
#if ENABLE_DEBUG_INIT
|
#if ENABLE_DEBUG_INIT
|
||||||
#define messageD message
|
#define messageD message
|
||||||
#else
|
#else
|
||||||
#define messageD(...) do {;} while(0);
|
#define messageD(...) do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
static void message(int device, const char *fmt, ...)
|
static void message(int device, const char *fmt, ...)
|
||||||
__attribute__ ((format(printf, 2, 3)));
|
__attribute__ ((format(printf, 2, 3)));
|
||||||
|
@ -17,7 +17,8 @@ char *find_block_device(char *path)
|
|||||||
dev_t dev;
|
dev_t dev;
|
||||||
char *retpath=NULL;
|
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;
|
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];
|
char devpath[PATH_MAX];
|
||||||
|
@ -15,13 +15,9 @@
|
|||||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
* 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 <paths.h>
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef BB_NOMMU
|
#ifdef BB_NOMMU
|
||||||
void vfork_daemon_rexec(int nochdir, int noclose,
|
void vfork_daemon_rexec(int nochdir, int noclose,
|
||||||
int argc, char **argv, char *foreground_opt)
|
int argc, char **argv, char *foreground_opt)
|
||||||
@ -43,7 +39,7 @@ void vfork_daemon_rexec(int nochdir, int noclose,
|
|||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
vfork_args = xcalloc(sizeof(char *), argc + 3);
|
vfork_args = xzalloc(sizeof(char *) * (argc + 3));
|
||||||
vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH;
|
vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH;
|
||||||
while (*argv) {
|
while (*argv) {
|
||||||
vfork_args[a++] = *argv;
|
vfork_args[a++] = *argv;
|
||||||
|
@ -2043,10 +2043,10 @@ static void identify_from_stdin(void)
|
|||||||
|
|
||||||
// Convert the newline-separated hex data into an identify block.
|
// Convert the newline-separated hex data into an identify block.
|
||||||
|
|
||||||
for (i = 0; i<256; i++)
|
for (i = 0; i<256; i++) {
|
||||||
{
|
|
||||||
int j;
|
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.
|
// Parse the data.
|
||||||
|
Reference in New Issue
Block a user