=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/finger/sprint.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/finger/sprint.c 1997/06/02 21:33:27 1.4 --- src/usr.bin/finger/sprint.c 1998/07/10 15:45:18 1.5 *************** *** 1,4 **** ! /* $OpenBSD: sprint.c,v 1.4 1997/06/02 21:33:27 kstailey Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: sprint.c,v 1.5 1998/07/10 15:45:18 mickey Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. *************** *** 38,44 **** #ifndef lint /*static char sccsid[] = "from: @(#)sprint.c 5.8 (Berkeley) 12/4/90";*/ ! static char rcsid[] = "$OpenBSD: sprint.c,v 1.4 1997/06/02 21:33:27 kstailey Exp $"; #endif /* not lint */ #include --- 38,44 ---- #ifndef lint /*static char sccsid[] = "from: @(#)sprint.c 5.8 (Berkeley) 12/4/90";*/ ! static char rcsid[] = "$OpenBSD: sprint.c,v 1.5 1998/07/10 15:45:18 mickey Exp $"; #endif /* not lint */ #include *************** *** 46,51 **** --- 46,52 ---- #include #include #include + #include #include "finger.h" #include "extern.h" *************** *** 137,146 **** PERSON *pn, **lp; PERSON **list; ! if (!(list = (PERSON **)malloc((u_int)(entries * sizeof(PERSON *))))) { ! (void)fprintf(stderr, "finger: out of space.\n"); ! exit(1); ! } for (lp = list, pn = phead; pn != NULL; pn = pn->next) *lp++ = pn; (void)qsort(list, entries, sizeof(PERSON *), psort); --- 138,145 ---- PERSON *pn, **lp; PERSON **list; ! if (!(list = (PERSON **)malloc((u_int)(entries * sizeof(PERSON *))))) ! err(1, "malloc"); for (lp = list, pn = phead; pn != NULL; pn = pn->next) *lp++ = pn; (void)qsort(list, entries, sizeof(PERSON *), psort);