svn commit: r344973 - stable/12/usr.bin/write
Mark Johnston
markj at FreeBSD.org
Sat Mar 9 21:09:45 UTC 2019
Author: markj
Date: Sat Mar 9 21:09:44 2019
New Revision: 344973
URL: https://svnweb.freebsd.org/changeset/base/344973
Log:
MFC r343354:
Remove extraneous setutxent() calls in write(1).
PR: 235096
Modified:
stable/12/usr.bin/write/write.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/usr.bin/write/write.c
==============================================================================
--- stable/12/usr.bin/write/write.c Sat Mar 9 17:17:59 2019 (r344972)
+++ stable/12/usr.bin/write/write.c Sat Mar 9 21:09:44 2019 (r344973)
@@ -204,7 +204,6 @@ utmp_chk(char *user, char *tty)
struct utmpx lu, *u;
strncpy(lu.ut_line, tty, sizeof lu.ut_line);
- setutxent();
while ((u = getutxline(&lu)) != NULL)
if (u->ut_type == USER_PROCESS &&
strcmp(user, u->ut_user) == 0) {
@@ -237,7 +236,6 @@ search_utmp(int devfd, char *user, char *tty, char *my
bestatime = 0;
user_is_me = 0;
- setutxent();
while ((u = getutxent()) != NULL)
if (u->ut_type == USER_PROCESS &&
strcmp(user, u->ut_user) == 0) {
More information about the svn-src-stable-12
mailing list