From 14f5fc03c4afcbf951f00a1c185db50613c336d8 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Tue, 6 Dec 2011 10:33:45 +0100 Subject: erl_driver.h: Enlarge types in driver output functions --- erts/emulator/beam/utils.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'erts/emulator/beam/utils.c') diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 4105f194a9..49b6618f73 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -2865,9 +2865,9 @@ store_external_or_ref_in_proc_(Process *proc, Eterm ns) return store_external_or_ref_(&hp, &MSO(proc), ns); } -void bin_write(int to, void *to_arg, byte* buf, int sz) +void bin_write(int to, void *to_arg, byte* buf, size_t sz) { - int i; + size_t i; for (i=0;i= 0) { + while(i != 0) { + --i; tail = CONS(hp, make_small((Uint)(byte)buf[i]), tail); hp += 2; - --i; } *hpp = hp; @@ -3459,11 +3459,9 @@ void erts_silence_warn_unused_result(long unused) * Handy functions when using a debugger - don't use in the code! */ -void upp(buf,sz) -byte* buf; -int sz; +void upp(byte *buf, size_t sz) { - bin_write(ERTS_PRINT_STDERR,NULL,buf,sz); + bin_write(ERTS_PRINT_STDERR, NULL, buf, sz); } void pat(Eterm atom) -- cgit v1.2.3