diff options
author | peter <peter@FreeBSD.org> | 1997-03-11 13:43:33 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-03-11 13:43:33 +0000 |
commit | deba7db48c7897a6302d3d706887bbddc3604c00 (patch) | |
tree | de15b52a10645135d816eb7c2d0fdc19e613c445 /usr.bin/finger/lprint.c | |
parent | dc74a95b3c87ac7e618302b89dfff6205c05cfc0 (diff) | |
download | FreeBSD-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.c | 9 |
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); |