summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko2023-05-27 14:51:46 +0200
committerDenys Vlasenko2023-05-27 14:52:17 +0200
commit9225f9684fedd5c997fc729fee29f8ac402b8db9 (patch)
treee3a39b09ee58143d0a86660f11760797d5b52c61 /libbb
parent6d9427420bab4ef756444fc8800dbf56d7dacf7d (diff)
downloadbusybox-9225f9684fedd5c997fc729fee29f8ac402b8db9.zip
busybox-9225f9684fedd5c997fc729fee29f8ac402b8db9.tar.gz
libbb/dump: make xxd_displayoff member conditional on xxd
With xxd not selected: function old new delta display 1459 1444 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/dump.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 49340b5..70f15c9 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -590,7 +590,11 @@ static NOINLINE void display(priv_dumper_t* dumper)
}
switch (pr->flags) {
case F_ADDRESS:
- printf(pr->fmt, (unsigned long long) dumper->pub.address + dumper->pub.xxd_displayoff);
+ printf(pr->fmt, (unsigned long long) dumper->pub.address
+#if ENABLE_XXD
+ + dumper->pub.xxd_displayoff
+#endif
+ );
break;
case F_BPAD:
printf(pr->fmt, "");
@@ -699,7 +703,11 @@ static NOINLINE void display(priv_dumper_t* dumper)
for (pr = dumper->endfu->nextpr; pr; pr = pr->nextpr) {
switch (pr->flags) {
case F_ADDRESS:
- printf(pr->fmt, (unsigned long long) dumper->eaddress + dumper->pub.xxd_displayoff);
+ printf(pr->fmt, (unsigned long long) dumper->eaddress
+#if ENABLE_XXD
+ + dumper->pub.xxd_displayoff
+#endif
+ );
break;
case F_TEXT:
fputs_stdout(pr->fmt);