aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-29 16:53:11 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-29 16:53:11 +0100
commit77a51a2709de1b646ab493f0bf771d896de6efc2 (patch)
treed0e44b91d8391ca06d4de3f7d5101da76c4f940e /miscutils
parentc7ef8187688b0e7f92d19b3fed2c4ecffe39a688 (diff)
downloadbusybox-77a51a2709de1b646ab493f0bf771d896de6efc2.tar.gz
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/dc.c2
-rw-r--r--miscutils/devfsd.c4
-rw-r--r--miscutils/i2c_tools.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 51376dd75..e94dc39e0 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -100,7 +100,7 @@ static void mod(void)
* 0
*/
if (d == 0) {
- bb_error_msg("remainder by zero");
+ bb_simple_error_msg("remainder by zero");
pop();
push(0);
return;
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 17d8fb6b9..e5bb8a2d8 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -362,7 +362,7 @@ static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found";
static void safe_memcpy(char *dest, const char *src, int len)
{
- memcpy(dest , src, len);
+ memcpy(dest, src, len);
dest[len] = '\0';
}
@@ -1106,7 +1106,7 @@ static int copy_inode(const char *destpath, const struct stat *dest_stat,
do_chown:
if (chown(destpath, source_stat->st_uid, source_stat->st_gid) == 0)
return TRUE;
- /*break;*/
+ /*break;*/
}
return FALSE;
} /* End Function copy_inode */
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 57cac5d47..cda17ee00 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -273,7 +273,7 @@ static int i2c_bus_lookup(const char *bus_str)
return xstrtou_range(bus_str, 10, 0, 0xfffff);
}
-#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CTRANSFER
+#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP
static int i2c_parse_bus_addr(const char *addr_str)
{
/* Slave address must be in range 0x03 - 0x77. */
@@ -286,14 +286,16 @@ static void i2c_set_pec(int fd, int pec)
itoptr(pec ? 1 : 0),
"can't set PEC");
}
+#endif
+#if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CTRANSFER
static void i2c_set_slave_addr(int fd, int addr, int force)
{
ioctl_or_perror_and_die(fd, force ? I2C_SLAVE_FORCE : I2C_SLAVE,
itoptr(addr),
"can't set address to 0x%02x", addr);
}
-#endif /* ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP */
+#endif
#if ENABLE_I2CGET || ENABLE_I2CSET
static int i2c_parse_data_addr(const char *data_addr)