rem: ttyname_b = ttyname (0);
add: ttyname_b = ttyname (STDIN_FILENO);
context: scan_entries (int n, const STRUCT_UTMP *utmp_buf){  char *ttyname_b IF_LINT ( = NULL);  if (include_heading)    print_heading ();  if (my_line_only)    {      ttyname_b = ttyname (0);      if (!ttyname_b)	return;      if (strncmp (ttyname_b, DEV_DIR_WITH_TRAILING_SLASH, DEV_DIR_LEN) == 0)	ttyname_b += DEV_DIR_LEN;	/* Discard /dev/ prefix.  */    }  while (n--)    {      if (!my_line_only ||	  strncmp (ttyname_b, utmp_buf->ut_line,		   sizeof (utmp_buf->ut_line)) == 0)	{	  if (need_users && IS_USER_PROCESS (utmp_buf))	    print_user (utmp_buf);	  else if (need_runlevel && UT_TYPE (utmp_buf) == RUN_LVL)	    print_runlevel (utmp_buf);	  else if (need_boottime && UT_TYPE (utmp_buf) == BOOT_TIME)	    print_boottime (utmp_buf);	  /* I've never seen one of these, so I don't know what it should	     look like :^)	     FIXME: handle OLD_TIME also, perhaps show the delta? */	  else if (need_clockchange && UT_TYPE (utmp_buf) == NEW_TIME)	    print_clockchange (utmp_buf);	  else if (need_initspawn && UT_TYPE (utmp_buf) == INIT_PROCESS)	    print_initspawn (utmp_buf);	  else if (need_login && UT_TYPE (utmp_buf) == LOGIN_PROCESS)	    print_login (utmp_buf);	  else if (need_deadprocs && UT_TYPE (utmp_buf) == DEAD_PROCESS)	    print_deadprocs (utmp_buf);	}      utmp_buf++;    }}