diff options
author | Sverker Eriksson <[email protected]> | 2013-02-19 20:09:43 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-20 15:29:09 +0100 |
commit | e41674160b3059a1bc507b4718c173c9879e506a (patch) | |
tree | f85283ca8f48fe1b2253a065e44d804a6a017e38 /erts/emulator/beam/erl_db_util.c | |
parent | 248a9d7095cc686c1c0f89ed4e69e54e42e0c013 (diff) | |
download | otp-e41674160b3059a1bc507b4718c173c9879e506a.tar.gz otp-e41674160b3059a1bc507b4718c173c9879e506a.tar.bz2 otp-e41674160b3059a1bc507b4718c173c9879e506a.zip |
erts: Correct some printf type formatting
Using %p, %bpx and %bex for pointers, UWords and Uint.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index fc1c946c7d..713ac0ba18 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -3415,8 +3415,7 @@ static DMCRet dmc_one_term(DMCContext *context, } default: erl_exit(1, "db_match_compile: " - "Bad object on heap: 0x%08lx\n", - (unsigned long) c); + "Bad object on heap: 0x%bex\n", c); } return retOk; } @@ -4861,7 +4860,7 @@ static Eterm my_copy_struct(Eterm t, Eterm **hp, ErlOffHeap* off_heap) ret = copy_struct(b,sz,hp,off_heap); } else { erl_exit(1, "Trying to constant-copy non constant expression " - "0x%08x in (d)ets:match compilation.", (unsigned long) t); + "0x%bex in (d)ets:match compilation.", t); } } else { sz = size_object(t); @@ -5395,7 +5394,7 @@ void db_match_dis(Binary *bp) erts_printf("Caller\n"); break; default: - erts_printf("??? (0x%08x)\n", *t); + erts_printf("??? (0x%bpx)\n", *t); ++t; break; } @@ -5407,13 +5406,13 @@ void db_match_dis(Binary *bp) first = 0; else erts_printf(", "); - erts_printf("0x%08x", (unsigned long) tmp); + erts_printf("%p", tmp); } erts_printf("}\n"); erts_printf("num_bindings: %d\n", prog->num_bindings); erts_printf("heap_size: %beu\n", prog->heap_size); erts_printf("stack_offset: %beu\n", prog->stack_offset); - erts_printf("text: 0x%08x\n", (unsigned long) prog->text); + erts_printf("text: %p\n", prog->text); erts_printf("stack_size: %d (words)\n", prog->heap_size-prog->stack_offset); } |