diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
commit | fa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (patch) | |
tree | 28fc9a13eaab935e4de055b561b333d67387a934 /openbsd-compat/strlcpy.c | |
parent | 04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (diff) | |
parent | 3e2e0ac10674d77618c4c7339e18b83ced247492 (diff) |
import openssh-4.3p2-gsskex-20060223.patch
Diffstat (limited to 'openbsd-compat/strlcpy.c')
-rw-r--r-- | openbsd-compat/strlcpy.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c index ccfa12a0a..679a5b291 100644 --- a/openbsd-compat/strlcpy.c +++ b/openbsd-compat/strlcpy.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */ | 1 | /* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */ |
2 | |||
3 | /* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */ | ||
4 | 2 | ||
5 | /* | 3 | /* |
6 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> |
@@ -18,13 +16,11 @@ | |||
18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
19 | */ | 17 | */ |
20 | 18 | ||
19 | /* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */ | ||
20 | |||
21 | #include "includes.h" | 21 | #include "includes.h" |
22 | #ifndef HAVE_STRLCPY | 22 | #ifndef HAVE_STRLCPY |
23 | 23 | ||
24 | #if defined(LIBC_SCCS) && !defined(lint) | ||
25 | static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $"; | ||
26 | #endif /* LIBC_SCCS and not lint */ | ||
27 | |||
28 | #include <sys/types.h> | 24 | #include <sys/types.h> |
29 | #include <string.h> | 25 | #include <string.h> |
30 | 26 | ||
@@ -36,9 +32,9 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp | |||
36 | size_t | 32 | size_t |
37 | strlcpy(char *dst, const char *src, size_t siz) | 33 | strlcpy(char *dst, const char *src, size_t siz) |
38 | { | 34 | { |
39 | register char *d = dst; | 35 | char *d = dst; |
40 | register const char *s = src; | 36 | const char *s = src; |
41 | register size_t n = siz; | 37 | size_t n = siz; |
42 | 38 | ||
43 | /* Copy as many bytes as will fit */ | 39 | /* Copy as many bytes as will fit */ |
44 | if (n != 0 && --n != 0) { | 40 | if (n != 0 && --n != 0) { |