aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
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 /erts/emulator/drivers
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 'erts/emulator/drivers')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c2
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index 603d1d47b6..347247ee7b 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -522,7 +522,7 @@ static void *ef_safe_alloc(Uint s)
static void *ef_safe_realloc(void *op, Uint s)
{
void *p = EF_REALLOC(op, s);
- if (!p) erl_exit(1, "efile drv: Can't reallocate %d bytes of memory\n", s);
+ if (!p) erl_exit(1, "efile drv: Can't reallocate %lu bytes of memory\n", (unsigned long)s);
return p;
}
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index ad112f7590..b250bac4dc 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -107,8 +107,8 @@ static void *ef_safe_alloc(Uint s)
{
void *p = EF_ALLOC(s);
if (!p) erl_exit(1,
- "unix efile drv: Can't allocate %d bytes of memory\n",
- s);
+ "unix efile drv: Can't allocate %lu bytes of memory\n",
+ (unsigned long)s);
return p;
}
@@ -118,8 +118,8 @@ static void *ef_safe_realloc(void *op, Uint s)
{
void *p = EF_REALLOC(op, s);
if (!p) erl_exit(1,
- "unix efile drv: Can't reallocate %d bytes of memory\n",
- s);
+ "unix efile drv: Can't reallocate %lu bytes of memory\n",
+ (unsigned long)s);
return p;
}