slice pointer and unit test fixes

This commit is contained in:
2022-07-04 05:44:42 +03:00
parent c39f89d995
commit e6b9d43646
4 changed files with 38 additions and 37 deletions

View File

@@ -112,7 +112,7 @@ export fn _nss_turbo_getpwuid_r(
errnop.* = @enumToInt(os.E.AGAIN);
return c.NSS_STATUS_UNAVAIL;
}
const cuser = state.file.?.db.getpwuid(uid, &buf[0..len]) catch |err| switch (err) {
const cuser = state.file.?.db.getpwuid(uid, buf[0..len]) catch |err| switch (err) {
error.OutOfMemory => {
errnop.* = @enumToInt(os.E.RANGE);
return c.NSS_STATUS_TRYAGAIN;