diff options
author | Michael Santos <[email protected]> | 2012-05-08 12:55:05 -0400 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-05-09 11:57:47 +0200 |
commit | 408e7760fc63a652c3ceb6479f9c7f5b3377942f (patch) | |
tree | 48d3d480fc6af7a40ccb102ee466818341301f19 /lib/runtime_tools/c_src | |
parent | 75dbcf3ce8cb63dea0d674b67cb5d3d64d250e2a (diff) | |
download | otp-408e7760fc63a652c3ceb6479f9c7f5b3377942f.tar.gz otp-408e7760fc63a652c3ceb6479f9c7f5b3377942f.tar.bz2 otp-408e7760fc63a652c3ceb6479f9c7f5b3377942f.zip |
Correct formating in exit error messages
Ensure displayed sizes are not negative.
Diffstat (limited to 'lib/runtime_tools/c_src')
-rw-r--r-- | lib/runtime_tools/c_src/trace_ip_drv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/runtime_tools/c_src/trace_ip_drv.c b/lib/runtime_tools/c_src/trace_ip_drv.c index 7f7ab8dd9d..6b77128761 100644 --- a/lib/runtime_tools/c_src/trace_ip_drv.c +++ b/lib/runtime_tools/c_src/trace_ip_drv.c @@ -590,8 +590,8 @@ static void *my_alloc(size_t size) void *ret; if ((ret = driver_alloc(size)) == NULL) { /* May or may not work... */ - fprintf(stderr, "Could not allocate %d bytes of memory in %s.", - (int) size, __FILE__); + fprintf(stderr, "Could not allocate %lu bytes of memory in %s.", + (unsigned long) size, __FILE__); exit(1); } return ret; @@ -605,8 +605,8 @@ static ErlDrvBinary *my_alloc_binary(int size) ErlDrvBinary *ret; if ((ret = driver_alloc_binary(size)) == NULL) { /* May or may not work... */ - fprintf(stderr, "Could not allocate a binary of %d bytes in %s.", - (int) size, __FILE__); + fprintf(stderr, "Could not allocate a binary of %lu bytes in %s.", + (unsigned long) size, __FILE__); exit(1); } return ret; |