projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dos2unix: tiny shrink
[oweals/busybox.git]
/
libbb
/
dump.c
diff --git
a/libbb/dump.c
b/libbb/dump.c
index 0d1bb18f2a179ee499f30322f1180435c76169f2..5e43d42a40e20fb833f20b8db7e8f0879c7f95b5 100644
(file)
--- a/
libbb/dump.c
+++ b/
libbb/dump.c
@@
-59,7
+59,8
@@
int bb_dump_size(FS * fs)
prec = atoi(fmt);
while (isdigit(*++fmt));
}
prec = atoi(fmt);
while (isdigit(*++fmt));
}
- if (!(p = strchr(size_conv_str + 12, *fmt))) {
+ p = strchr(size_conv_str + 12, *fmt);
+ if (!p) {
if (*fmt == 's') {
bcnt += prec;
} else if (*fmt == '_') {
if (*fmt == 's') {
bcnt += prec;
} else if (*fmt == '_') {
@@
-99,7
+100,7
@@
static void rewrite(FS * fs)
if (!fu->nextpr)
fu->nextpr = pr;
/* ignore nextpr -- its unused inside the loop and is
if (!fu->nextpr)
fu->nextpr = pr;
/* ignore nextpr -- its unused inside the loop and is
- * uninitialized 1st time thr
u
.
+ * uninitialized 1st time thr
ough
.
*/
/* bb_dump_skip preceding text and up to the next % sign */
*/
/* bb_dump_skip preceding text and up to the next % sign */
@@
-162,7
+163,8
@@
static void rewrite(FS * fs)
DO_INT_CONV:
{
const char *e;
DO_INT_CONV:
{
const char *e;
- if (!(e = strchr(lcc, *p1))) {
+ e = strchr(lcc, *p1);
+ if (!e) {
goto DO_BAD_CONV_CHAR;
}
pr->flags = F_INT;
goto DO_BAD_CONV_CHAR;
}
pr->flags = F_INT;
@@
-297,7
+299,7
@@
static void do_skip(const char *fname, int statok)
if (statok) {
if (fstat(STDIN_FILENO, &sbuf)) {
if (statok) {
if (fstat(STDIN_FILENO, &sbuf)) {
- bb_
perror_msg_and_die("%s",
fname);
+ bb_
simple_perror_msg_and_die(
fname);
}
if ((!(S_ISCHR(sbuf.st_mode) ||
S_ISBLK(sbuf.st_mode) ||
}
if ((!(S_ISCHR(sbuf.st_mode) ||
S_ISBLK(sbuf.st_mode) ||
@@
-309,7
+311,7
@@
static void do_skip(const char *fname, int statok)
}
}
if (fseek(stdin, bb_dump_skip, SEEK_SET)) {
}
}
if (fseek(stdin, bb_dump_skip, SEEK_SET)) {
- bb_
perror_msg_and_die("%s",
fname);
+ bb_
simple_perror_msg_and_die(
fname);
}
savaddress = address += bb_dump_skip;
bb_dump_skip = 0;
}
savaddress = address += bb_dump_skip;
bb_dump_skip = 0;
@@
-328,7
+330,7
@@
static int next(char **argv)
for (;;) {
if (*_argv) {
if (!(freopen(*_argv, "r", stdin))) {
for (;;) {
if (*_argv) {
if (!(freopen(*_argv, "r", stdin))) {
- bb_
perror_msg("%s",
*_argv);
+ bb_
simple_perror_msg(
*_argv);
exitval = 1;
++_argv;
continue;
exitval = 1;
++_argv;
continue;
@@
-393,7
+395,7
@@
static unsigned char *get(void)
bb_dump_length == -1 ? need : MIN(bb_dump_length, need), stdin);
if (!n) {
if (ferror(stdin)) {
bb_dump_length == -1 ? need : MIN(bb_dump_length, need), stdin);
if (!n) {
if (ferror(stdin)) {
- bb_
perror_msg("%s",
_argv[-1]);
+ bb_
simple_perror_msg(
_argv[-1]);
}
ateof = 1;
continue;
}
ateof = 1;
continue;