Skip to content

Commit 7128884

Browse files
committed
Remove unnecessary null to optional anyopaque coercion
Signed-off-by: Bernard Assan <[email protected]>
1 parent cda441d commit 7128884

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

lib/std/os/linux/IoUring.zig

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,20 +1364,15 @@ pub fn register_personality(self: *IoUring) !void {
13641364
const res = linux.io_uring_register(
13651365
self.fd,
13661366
.register_personality,
1367-
@as(?*anyopaque, null),
1367+
null,
13681368
0,
13691369
);
13701370
try handle_registration_result(res);
13711371
}
13721372

13731373
pub fn unregister_personality(self: *IoUring, credential_id: u32) !void {
13741374
assert(self.fd >= 0);
1375-
const res = linux.io_uring_register(
1376-
self.fd,
1377-
.unregister_personality,
1378-
@as(?*anyopaque, null),
1379-
credential_id,
1380-
);
1375+
const res = linux.io_uring_register(self.fd, .unregister_personality, null, credential_id);
13811376
try handle_registration_result(res);
13821377
}
13831378

@@ -1397,8 +1392,8 @@ pub fn enable_rings(self: *IoUring) !void {
13971392
const res = linux.io_uring_register(
13981393
self.fd,
13991394
.register_enable_rings,
1400-
@as(?*anyopaque, null),
1401-
@intCast(0),
1395+
null,
1396+
0,
14021397
);
14031398
try handle_registration_result(res);
14041399
}
@@ -1423,7 +1418,7 @@ pub fn unregister_iowq_aff(self: *IoUring) !void {
14231418
const res = linux.io_uring_register(
14241419
self.fd,
14251420
.unregister_iowq_aff,
1426-
@as(?*anyopaque, null),
1421+
null,
14271422
0,
14281423
);
14291424
try handle_registration_result(res);

0 commit comments

Comments
 (0)