summaryrefslogtreecommitdiffstats
path: root/lib/libpcap
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-02-23 06:55:14 +0000
committerphk <phk@FreeBSD.org>1995-02-23 06:55:14 +0000
commit9bf4b628ff93fa5db7ac452eb1a86a0fb8015d3a (patch)
treecea30dc95489ec7ca73e314248e638880fe40b0f /lib/libpcap
parentd0962851ce59c4a39956d9535caeb7bcccf18ca0 (diff)
downloadFreeBSD-src-9bf4b628ff93fa5db7ac452eb1a86a0fb8015d3a.zip
FreeBSD-src-9bf4b628ff93fa5db7ac452eb1a86a0fb8015d3a.tar.gz
Quench a warning and fix some duplicity by using the official strerror
routine, instead of rolling our own.
Diffstat (limited to 'lib/libpcap')
-rw-r--r--lib/libpcap/pcap.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/libpcap/pcap.c b/lib/libpcap/pcap.c
index 82070d2..e0433e9 100644
--- a/lib/libpcap/pcap.c
+++ b/lib/libpcap/pcap.c
@@ -33,12 +33,13 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Header: pcap.c,v 1.12 94/06/12 14:32:23 leres Exp $ (LBL)";
+ "@(#) $Header: /home/ncvs/src/lib/libpcap/pcap.c,v 1.1.1.1 1995/01/20 04:13:03 jkh Exp $ (LBL)";
#endif
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include "pcap-int.h"
@@ -151,16 +152,7 @@ pcap_geterr(pcap_t *p)
char *
pcap_strerror(int errnum)
{
- extern int sys_nerr;
-/*
- extern char *sys_errlist[];
-*/
- static char ebuf[20];
-
- if ((unsigned int)errnum < sys_nerr)
- return (sys_errlist[errnum]);
- (void)sprintf(ebuf, "Unknown error: %d", errnum);
- return(ebuf);
+ return strerror(errnum);
}
void
OpenPOWER on IntegriCloud