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