X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/bbc1cfa669a5f51ed26bae3784447076e3fbc80f..refs/heads/master:/missing/strlcpy.c diff --git a/missing/strlcpy.c b/missing/strlcpy.c index a92e4d13..00792bc1 100644 --- a/missing/strlcpy.c +++ b/missing/strlcpy.c @@ -1,5 +1,5 @@ /* $NetBSD: strlcpy.c,v 1.5 1999/09/20 04:39:47 lukem Exp $ */ -/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */ +/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */ /* * Copyright (c) 1998 Todd C. Miller @@ -28,19 +28,14 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003-11-16 09:36:52 guy Exp $ (LBL)"; -#endif - -#ifdef HAVE_CONFIG_H #include -#endif -#include +#include #include +#include "netdissect.h" + /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -49,9 +44,9 @@ static const char rcsid[] _U_ = size_t strlcpy(char *dst, const char *src, size_t siz) { - register char *d = dst; - register const char *s = src; - register size_t n = siz; + char *d = dst; + const char *s = src; + size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) {