Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2019 21:09:44 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r344973 - stable/12/usr.bin/write
Message-ID:  <201903092109.x29L9iJx092442@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903092109.x29L9iJx092442>