Fix a bug, it was returning a pointer to a variable on the stack, instead

of the specially strdup()'ed version.
This commit is contained in:
Peter Wemm 1996-08-19 14:28:48 +00:00
parent 1340e5b6fe
commit c3944f3dd1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17668

View File

@ -23,7 +23,7 @@
*/
#ifndef lint
static char rcsid[] =
"@(#) $Header: addrtoname.c,v 1.37 94/06/16 00:42:28 mccanne Exp $ (LBL)";
"@(#) $Header: /home/ncvs/src/usr.sbin/tcpdump/tcpdump/addrtoname.c,v 1.2 1995/03/08 12:52:07 olah Exp $ (LBL)";
#endif
#include <sys/types.h>
@ -353,7 +353,7 @@ etheraddr_string(register const u_char *ep)
char buf[128];
if (ether_ntohost(buf, (struct ether_addr *)ep) == 0) {
tp->e_name = savestr(buf);
return (buf);
return (tp->e_name);
}
}
#endif