aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/core/utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c
index 21f2297..2b7f0ec 100644
--- a/src/lib/core/utils.c
+++ b/src/lib/core/utils.c
@@ -925,9 +925,7 @@ void debug_hexdump(char *data, int len) {
char *pos = start;
while (pos != end) {
if (count == 0) {
- const char *pos_fmt = "%p";
- const int pos_fmt_len = snprintf(NULL, 0, pos_fmt, pos);
- snprintf(addr + strlen(addr), sizeof(addr) - strlen(addr) - pos_fmt_len, pos_fmt, pos);
+ snprintf(addr + strlen(addr), sizeof(addr) - strlen(addr), "%p", pos);
}
if (count == 8) {
strncat(bytes, " ", sizeof(bytes) - strlen(bytes) - 1);