]> The Tcpdump Group git mirrors - tcpdump/blobdiff - missing/strlcpy.c
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / missing / strlcpy.c
index dec09fe70563e77a53d36150e1ded6300bd84dbe..00792bc1b9d520ac1f6ceee521ee7f2d9bd1c5fe 100644 (file)
@@ -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 <[email protected]>
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
-#ifdef HAVE_CONFIG_H 
 #include <config.h>
-#endif
-
-#include <tcpdump-stdinc.h>
-
 
-#include "interface.h"
-
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.4 2003-11-15 00:39:48 guy Exp $ (LBL)";
-#endif
+#include <netdissect-stdinc.h>
 
 #include <string.h>
 
+#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).
@@ -53,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) {