summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger/lprint.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-03-11 13:43:33 +0000
committerpeter <peter@FreeBSD.org>1997-03-11 13:43:33 +0000
commitdeba7db48c7897a6302d3d706887bbddc3604c00 (patch)
treede15b52a10645135d816eb7c2d0fdc19e613c445 /usr.bin/finger/lprint.c
parentdc74a95b3c87ac7e618302b89dfff6205c05cfc0 (diff)
downloadFreeBSD-src-deba7db48c7897a6302d3d706887bbddc3604c00.zip
FreeBSD-src-deba7db48c7897a6302d3d706887bbddc3604c00.tar.gz
Merge from Lite2
Diffstat (limited to 'usr.bin/finger/lprint.c')
-rw-r--r--usr.bin/finger/lprint.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c
index 93e4a9b..847f26d 100644
--- a/usr.bin/finger/lprint.c
+++ b/usr.bin/finger/lprint.c
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)lprint.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)lprint.c 8.3 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/types.h>
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)lprint.c 8.1 (Berkeley) 6/6/93";
#include <fcntl.h>
#include <time.h>
#include <db.h>
+#include <err.h>
#include <pwd.h>
#include <utmp.h>
#include <errno.h>
@@ -71,15 +72,17 @@ lflag_print()
extern int pplan;
register PERSON *pn;
register int sflag, r;
+ PERSON *tmp;
DBT data, key;
for (sflag = R_FIRST;; sflag = R_NEXT) {
r = (*db->seq)(db, &key, &data, sflag);
if (r == -1)
- err("db seq: %s", strerror(errno));
+ err(1, "db seq");
if (r == 1)
break;
- pn = *(PERSON **)data.data;
+ memmove(&tmp, data.data, sizeof tmp);
+ pn = tmp;
if (sflag != R_FIRST)
putchar('\n');
lprint(pn);
OpenPOWER on IntegriCloud