- if (*usr.ut_name) {
- if (strncmp(usr.ut_line, "tty", 3) != 0 ||
- strchr("pqrstuvwxy", usr.ut_line[3]) == 0 ||
- *usr.ut_host != '\0')
- head = log_in(head, &usr);
- } else
- head = log_out(head, &usr);
+ if (strncmp(u->ut_line, "tty", 3) != 0 ||
+ strchr("pqrstuvwxy", u->ut_line[3]) == 0 ||
+ *u->ut_host != '\0')
+ head = log_in(head, u);
+ break;
+ case DEAD_PROCESS:
+ head = log_out(head, u);