rem: n_entries = 0; u = (char **) xmalloc (n * sizeof (u[0])); for (i = 0; i < n; i++)
add: while (n--)
context: list_entries_users (int n, const STRUCT_UTMP *this){  char **u;  int i;  int n_entries;  n_entries = 0;  u = (char **) xmalloc (n * sizeof (u[0]));  for (i = 0; i < n; i++)    {      if (UT_USER (this) [0]#ifdef USER_PROCESS	  && this->ut_type == USER_PROCESS#endif	  )	{	  char *trimmed_name;	  trimmed_name = extract_trimmed_name (this);	  u[n_entries] = trimmed_name;	  ++n_entries;	}      this++;    }  qsort (u, n_entries, sizeof (u[0]), userid_compare);  for (i = 0; i < n_entries; i++)    {      int c;      fputs (u[i], stdout);      c = (i < n_entries - 1 ? ' ' : '\n');      putchar (c);    }  for (i = 0; i < n_entries; i++)    free (u[i]);  free (u);}