Use full hostnames when sorting rwho database entries. Fixes PR bin/8401
by John Darrow.
This commit is contained in:
parent
5ada26d247
commit
ab40c54610
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rwho.c,v 1.11 1998/12/19 21:52:00 christos Exp $ */
|
||||
/* $NetBSD: rwho.c,v 1.12 1999/09/20 20:35:43 tron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)rwho.c 8.1 (Berkeley) 6/6/93";*/
|
||||
__RCSID("$NetBSD: rwho.c,v 1.11 1998/12/19 21:52:00 christos Exp $");
|
||||
__RCSID("$NetBSD: rwho.c,v 1.12 1999/09/20 20:35:43 tron Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -196,8 +196,9 @@ utmpcmp(v1, v2)
|
||||
rc = strncmp(u1->myutmp.out_name, u2->myutmp.out_name, 8);
|
||||
if (rc)
|
||||
return (rc);
|
||||
rc = strncmp(u1->myhost, u2->myhost, 8);
|
||||
rc = strcmp(u1->myhost, u2->myhost);
|
||||
if (rc)
|
||||
return (rc);
|
||||
return (strncmp(u1->myutmp.out_line, u2->myutmp.out_line, 8));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user