aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/examples
diff options
context:
space:
mode:
authorMichael Santos <[email protected]>2012-05-08 12:55:05 -0400
committerHenrik Nord <[email protected]>2012-05-09 11:57:47 +0200
commit408e7760fc63a652c3ceb6479f9c7f5b3377942f (patch)
tree48d3d480fc6af7a40ccb102ee466818341301f19 /lib/kernel/examples
parent75dbcf3ce8cb63dea0d674b67cb5d3d64d250e2a (diff)
downloadotp-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/kernel/examples')
-rw-r--r--lib/kernel/examples/uds_dist/c_src/uds_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/examples/uds_dist/c_src/uds_drv.c b/lib/kernel/examples/uds_dist/c_src/uds_drv.c
index 9327ab19dc..9ad6b85a0f 100644
--- a/lib/kernel/examples/uds_dist/c_src/uds_drv.c
+++ b/lib/kernel/examples/uds_dist/c_src/uds_drv.c
@@ -967,7 +967,7 @@ static void *my_malloc(size_t size)
void *ptr;
if ((ptr = driver_alloc(size)) == NULL) {
- erl_exit(1,"Could not allocate %d bytes of memory",(int) size);
+ erl_exit(1,"Could not allocate %lu bytes of memory",(unsigned long) size);
}
return ptr;
}
@@ -977,7 +977,7 @@ static void *my_realloc(void *ptr, size_t size)
void erl_exit(int, char *, ...);
void *nptr;
if ((nptr = driver_realloc(ptr, size)) == NULL) {
- erl_exit(1,"Could not reallocate %d bytes of memory",(int) size);
+ erl_exit(1,"Could not reallocate %lu bytes of memory",(unsigned long) size);
}
return nptr;
}