=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/route.c,v retrieving revision 1.57 retrieving revision 1.58 diff -c -r1.57 -r1.58 *** src/usr.bin/netstat/route.c 2003/10/03 21:22:32 1.57 --- src/usr.bin/netstat/route.c 2003/10/04 21:18:57 1.58 *************** *** 1,4 **** ! /* $OpenBSD: route.c,v 1.57 2003/10/03 21:22:32 itojun Exp $ */ /* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: route.c,v 1.58 2003/10/04 21:18:57 deraadt Exp $ */ /* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ /* *************** *** 34,40 **** #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else ! static char *rcsid = "$OpenBSD: route.c,v 1.57 2003/10/03 21:22:32 itojun Exp $"; #endif #endif /* not lint */ --- 34,40 ---- #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else ! static char *rcsid = "$OpenBSD: route.c,v 1.58 2003/10/04 21:18:57 deraadt Exp $"; #endif #endif /* not lint */ *************** *** 73,79 **** #define INET #endif - #include #include #include "netstat.h" --- 73,78 ---- *************** *** 395,404 **** perror("route-sysctl-estimate"); exit(1); } ! if ((buf = malloc(needed)) == 0) { ! printf("out of space\n"); ! exit(1); ! } if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { perror("sysctl of routing table"); exit(1); --- 394,401 ---- perror("route-sysctl-estimate"); exit(1); } ! if ((buf = malloc(needed)) == NULL) ! errx(1, NULL); if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { perror("sysctl of routing table"); exit(1);