nit: naming
This commit is contained in:
parent
a63c60cc6f
commit
1995da9a77
@ -109,7 +109,7 @@ export fn _nss_turbo_getpwuid_r(
|
||||
buflen: usize,
|
||||
errnop: *c_int,
|
||||
) c.enum_nss_status {
|
||||
const db = get_db(errnop) orelse return c.NSS_STATUS_UNAVAIL;
|
||||
const db = getDb(errnop) orelse return c.NSS_STATUS_UNAVAIL;
|
||||
if (db.getpwuid(uid, buffer[0..buflen])) |maybe_cuser| {
|
||||
if (maybe_cuser) |cuser| {
|
||||
passwd.* = cuser;
|
||||
@ -133,7 +133,7 @@ export fn _nss_turbo_getpwnam_r(
|
||||
buflen: usize,
|
||||
errnop: *c_int,
|
||||
) c.enum_nss_status {
|
||||
const db = get_db(errnop) orelse return c.NSS_STATUS_UNAVAIL;
|
||||
const db = getDb(errnop) orelse return c.NSS_STATUS_UNAVAIL;
|
||||
const nameSlice = mem.sliceTo(name, 0);
|
||||
if (db.getpwnam(nameSlice, buffer[0..buflen])) |maybe_cuser| {
|
||||
if (maybe_cuser) |cuser| {
|
||||
@ -151,9 +151,8 @@ export fn _nss_turbo_getpwnam_r(
|
||||
}
|
||||
}
|
||||
|
||||
fn get_db(errnop: *c_int) ?DB {
|
||||
fn getDb(errnop: *c_int) ?DB {
|
||||
global_init.call();
|
||||
|
||||
if (global_state.file) |file| {
|
||||
return file.db;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user