struct spwd * getspent(void) { nss_XbyY_buf_t *b = get_spbuf(); return (b == NULL ? NULL : getspent_r(b->result, b->buffer, b->buflen)); }
struct spwd *getspent(void) { int ret; static char line_buff[PWD_BUFFER_SIZE]; static struct spwd spwd; struct spwd *result; LOCK; if ((ret=getspent_r(&spwd, line_buff, sizeof(line_buff), &result)) == 0) { UNLOCK; return &spwd; } UNLOCK; __set_errno(ret); return NULL; }