diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/dc.c | 2 | ||||
-rw-r--r-- | miscutils/devfsd.c | 4 | ||||
-rw-r--r-- | miscutils/i2c_tools.c | 6 |
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) | |||
100 | * 0 | 100 | * 0 |
101 | */ | 101 | */ |
102 | if (d == 0) { | 102 | if (d == 0) { |
103 | bb_error_msg("remainder by zero"); | 103 | bb_simple_error_msg("remainder by zero"); |
104 | pop(); | 104 | pop(); |
105 | push(0); | 105 | push(0); |
106 | return; | 106 | 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"; | |||
362 | 362 | ||
363 | static void safe_memcpy(char *dest, const char *src, int len) | 363 | static void safe_memcpy(char *dest, const char *src, int len) |
364 | { | 364 | { |
365 | memcpy(dest , src, len); | 365 | memcpy(dest, src, len); |
366 | dest[len] = '\0'; | 366 | dest[len] = '\0'; |
367 | } | 367 | } |
368 | 368 | ||
@@ -1106,7 +1106,7 @@ static int copy_inode(const char *destpath, const struct stat *dest_stat, | |||
1106 | do_chown: | 1106 | do_chown: |
1107 | if (chown(destpath, source_stat->st_uid, source_stat->st_gid) == 0) | 1107 | if (chown(destpath, source_stat->st_uid, source_stat->st_gid) == 0) |
1108 | return TRUE; | 1108 | return TRUE; |
1109 | /*break;*/ | 1109 | /*break;*/ |
1110 | } | 1110 | } |
1111 | return FALSE; | 1111 | return FALSE; |
1112 | } /* End Function copy_inode */ | 1112 | } /* 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) | |||
273 | return xstrtou_range(bus_str, 10, 0, 0xfffff); | 273 | return xstrtou_range(bus_str, 10, 0, 0xfffff); |
274 | } | 274 | } |
275 | 275 | ||
276 | #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CTRANSFER | 276 | #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP |
277 | static int i2c_parse_bus_addr(const char *addr_str) | 277 | static int i2c_parse_bus_addr(const char *addr_str) |
278 | { | 278 | { |
279 | /* Slave address must be in range 0x03 - 0x77. */ | 279 | /* Slave address must be in range 0x03 - 0x77. */ |
@@ -286,14 +286,16 @@ static void i2c_set_pec(int fd, int pec) | |||
286 | itoptr(pec ? 1 : 0), | 286 | itoptr(pec ? 1 : 0), |
287 | "can't set PEC"); | 287 | "can't set PEC"); |
288 | } | 288 | } |
289 | #endif | ||
289 | 290 | ||
291 | #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CTRANSFER | ||
290 | static void i2c_set_slave_addr(int fd, int addr, int force) | 292 | static void i2c_set_slave_addr(int fd, int addr, int force) |
291 | { | 293 | { |
292 | ioctl_or_perror_and_die(fd, force ? I2C_SLAVE_FORCE : I2C_SLAVE, | 294 | ioctl_or_perror_and_die(fd, force ? I2C_SLAVE_FORCE : I2C_SLAVE, |
293 | itoptr(addr), | 295 | itoptr(addr), |
294 | "can't set address to 0x%02x", addr); | 296 | "can't set address to 0x%02x", addr); |
295 | } | 297 | } |
296 | #endif /* ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP */ | 298 | #endif |
297 | 299 | ||
298 | #if ENABLE_I2CGET || ENABLE_I2CSET | 300 | #if ENABLE_I2CGET || ENABLE_I2CSET |
299 | static int i2c_parse_data_addr(const char *data_addr) | 301 | static int i2c_parse_data_addr(const char *data_addr) |