authorgravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-21 12:03:52+02:00
committergravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-21 12:03:52+02:00
log2d8df2b745d4004a790375deb654065224edd6b0
treeae7c271f3028d5c897bb1931a9fe79baa54cd780
parent7719abbf5460c320b63f7fe10ee27b9e9b66a069

Use @intCast instead of @truncate


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/os/linux/io_uring.zig+5-5
......@@ -404,7 +404,7 @@ pub const IO_Uring = struct {
404404 sqe.fd = fd;
405405 sqe.off = offset;
406406 sqe.addr = @ptrToInt(buffer.ptr);
407 sqe.len = @truncate(u32, buffer.len);
407 sqe.len = @intCast(u32, buffer.len);
408408 sqe.user_data = user_data;
409409 return sqe;
410410 }
......@@ -423,7 +423,7 @@ pub const IO_Uring = struct {
423423 sqe.fd = fd;
424424 sqe.off = offset;
425425 sqe.addr = @ptrToInt(buffer.ptr);
426 sqe.len = @truncate(u32, buffer.len);
426 sqe.len = @intCast(u32, buffer.len);
427427 sqe.user_data = user_data;
428428 return sqe;
429429 }
......@@ -444,7 +444,7 @@ pub const IO_Uring = struct {
444444 sqe.fd = fd;
445445 sqe.off = offset;
446446 sqe.addr = @ptrToInt(iovecs.ptr);
447 sqe.len = @truncate(u32, iovecs.len);
447 sqe.len = @intCast(u32, iovecs.len);
448448 sqe.user_data = user_data;
449449 return sqe;
450450 }
......@@ -465,7 +465,7 @@ pub const IO_Uring = struct {
465465 sqe.fd = fd;
466466 sqe.off = offset;
467467 sqe.addr = @ptrToInt(iovecs.ptr);
468 sqe.len = @truncate(u32, iovecs.len);
468 sqe.len = @intCast(u32, iovecs.len);
469469 sqe.user_data = user_data;
470470 return sqe;
471471 }
......@@ -516,7 +516,7 @@ pub const IO_Uring = struct {
516516 self.fd,
517517 .REGISTER_FILES,
518518 @ptrCast(*const c_void, fds.ptr),
519 @truncate(u32, fds.len)
519 @intCast(u32, fds.len)
520520 );
521521 switch (linux.getErrno(res)) {
522522 0 => {},