aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/efile_drv.c
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-12-05 17:11:01 +0100
committerBjörn Gustavsson <[email protected]>2011-12-07 17:40:14 +0100
commit72e30a62bf3142b8734a02609625893505a3b120 (patch)
tree007a14809d282ae9140bc7052b62b3bef3b37c5d /erts/emulator/drivers/common/efile_drv.c
parentc4f3d1354284310f18f3f6d5b3782c64e06fdea1 (diff)
downloadotp-72e30a62bf3142b8734a02609625893505a3b120.tar.gz
otp-72e30a62bf3142b8734a02609625893505a3b120.tar.bz2
otp-72e30a62bf3142b8734a02609625893505a3b120.zip
erl_driver.h: Enlarge types in driver queue and alloc functions
Diffstat (limited to 'erts/emulator/drivers/common/efile_drv.c')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c10
1 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 5c52b99348..2065d03b1f 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -1048,7 +1048,7 @@ static void invoke_read_line(void *data)
d->c.read_line.read_offset - d->c.read_line.read_size;
if (size == 0) {
/* Need more place */
- size_t need = (d->c.read_line.read_size >= DEFAULT_LINEBUF_SIZE) ?
+ ErlDrvSizeT need = (d->c.read_line.read_size >= DEFAULT_LINEBUF_SIZE) ?
d->c.read_line.read_size + DEFAULT_LINEBUF_SIZE : DEFAULT_LINEBUF_SIZE;
ErlDrvBinary *newbin = driver_alloc_binary(need);
if (newbin == NULL) {
@@ -2929,8 +2929,8 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
cq_enq(desc, d);
} goto done;
case FILE_WRITE: {
- int skip = 1;
- int size = ev->size - skip;
+ ErlDrvSizeT skip = 1;
+ ErlDrvSizeT size = ev->size - skip;
if (lseek_flush_read(desc, &err) < 0) {
reply_posix_error(desc, err);
goto done;
@@ -2939,7 +2939,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
reply_posix_error(desc, EBADF);
goto done;
}
- if (size <= 0) {
+ if (size == 0) {
reply_Uint(desc, size);
goto done;
}
@@ -3053,7 +3053,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
EF_FREE(d);
reply_Uint(desc, 0);
} else {
- size_t skip = 1 + 4 + 8*(2*n);
+ ErlDrvSizeT skip = 1 + 4 + 8*(2*n);
if (skip + total != ev->size) {
/* Actual amount of data does not match
* total of all pos/size specs