rem: display = strrchr (ut_host, ':');
add: display = strchr (ut_host, ':');
context: print_entry (const STRUCT_UTMP *utmp_ent){  struct stat stats;  time_t last_change;  char mesg;#define DEV_DIR_WITH_TRAILING_SLASH "/dev/"#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)  char line[sizeof (utmp_ent->ut_line) + DEV_DIR_LEN + 1];  time_t tm;  /* Copy ut_line into LINE, prepending `/dev/' if ut_line is not     already an absolute pathname.  Some system may put the full,     absolute pathname in ut_line.  */  if (utmp_ent->ut_line[0] == '/')    {      strncpy (line, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));      line[sizeof (utmp_ent->ut_line)] = '\0';    }  else    {      strcpy (line, DEV_DIR_WITH_TRAILING_SLASH);      strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));      line[DEV_DIR_LEN + sizeof (utmp_ent->ut_line)] = '\0';    }  if (stat (line, &stats) == 0)    {      mesg = (stats.st_mode & S_IWGRP) ? ' ' : '*';      last_change = stats.st_atime;    }  else    {      mesg = '?';      last_change = 0;    }  printf ("%-8.*s", (int) sizeof (UT_USER (utmp_ent)), UT_USER (utmp_ent));  if (include_fullname)    {      struct passwd *pw;      char name[sizeof (UT_USER (utmp_ent)) + 1];      strncpy (name, UT_USER (utmp_ent), sizeof (UT_USER (utmp_ent)));      name[sizeof (UT_USER (utmp_ent))] = '\0';      pw = getpwnam (name);      if (pw == NULL)	printf (" %19s", "        ???");      else	{	  char *const comma = strchr (pw->pw_gecos, ',');	  char *result;	  if (comma)	    *comma = '\0';	  result = create_fullname (pw->pw_gecos, pw->pw_name);	  printf (" %-19.19s", result);	  free (result);	}    }  printf (" %c%-8.*s",	  mesg, (int) sizeof (utmp_ent->ut_line), utmp_ent->ut_line);  if (include_idle)    {      if (last_change)	printf (" %-6s", idle_string (last_change));      else	printf (" %-6s", "???");    }  /* Don't take the address of UT_TIME_MEMBER directly.     Ulrich Drepper wrote:     ``... GNU libc (and perhaps other libcs as well) have extended     utmp file formats which do not use a simple time_t ut_time field.     In glibc, ut_time is a macro which selects for backward compatibility     the tv_sec member of a struct timeval value.''  */  tm = UT_TIME_MEMBER (utmp_ent);  printf (" %-12.12s", ctime (&tm) + 4);#ifdef HAVE_UT_HOST  if (include_where && utmp_ent->ut_host[0])    {      extern char *canon_host ();      char ut_host[sizeof (utmp_ent->ut_host) + 1];      char *host = 0, *display = 0;      /* Copy the host name into UT_HOST, and ensure it's nul terminated. */      strncpy (ut_host, utmp_ent->ut_host, (int) sizeof (utmp_ent->ut_host));      ut_host[sizeof (utmp_ent->ut_host)] = '\0';      /* Look for an X display.  */      display = strrchr (ut_host, ':');      if (display)	*display++ = '\0';      if (*ut_host)	/* See if we can canonicalize it.  */	host = canon_host (ut_host);      if ( ! host)	host = ut_host;      if (display)	printf (" %s:%s", host, display);      else	printf (" %s", host);    }#endif  putchar ('\n');}