Lines Matching refs:lp
270 struct user_entry *lp;
272 SLIST_FOREACH(lp, &Users, next)
273 show(lp->user, lp->time);
283 struct utmpx_entry *lp;
295 SLIST_FOREACH(lp, &CurUtmpx, next) {
296 timersub(&today, &lp->time, &diff);
297 update_user(lp->user, diff);
299 lp->time = today;
318 struct utmpx_entry *lp, *lp2, *tlp;
321 for (lp = SLIST_FIRST(&CurUtmpx), lp2 = NULL; lp != NULL;)
324 memcmp(lp->id, up->ut_id, sizeof(up->ut_id)) == 0)) {
325 timersub(&up->ut_tv, &lp->time, &secs);
326 update_user(lp->user, secs);
330 tlp = lp;
331 lp = SLIST_NEXT(lp, next);
338 lp2 = lp;
339 lp = SLIST_NEXT(lp, next);
349 struct utmpx_entry *lp;
391 if ((lp = malloc(sizeof(*lp))) == NULL)
393 SLIST_INSERT_HEAD(&CurUtmpx, lp, next);
394 strlcpy(lp->user, up->ut_user, sizeof(lp->user));
395 memcpy(lp->id, up->ut_id, sizeof(lp->id));
397 memcpy(lp->line, up->ut_line, sizeof(lp->line));
399 lp->time = up->ut_tv;
405 struct utmpx_entry *lp;
451 SLIST_FOREACH(lp, &CurUtmpx, next)
452 timersub(&lp->time, &clock_shift, &lp->time);