diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-11-10 16:26:17 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-11-10 16:26:17 +1100 |
commit | 52245663035ec7322ec2e1288d9692be7b2e4181 (patch) | |
tree | b8e23ef34cd68da4d10d03ac93a7d76611041878 /openbsd-compat/strlcpy.c | |
parent | 7f24a0e64774e6566242f44b0f06ab06607d0c97 (diff) |
- (dtucker) [openbsd-compat/strlcpy.c] Update from OpenBSD 1.8 -> 1.10.
Diffstat (limited to 'openbsd-compat/strlcpy.c')
-rw-r--r-- | openbsd-compat/strlcpy.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c index 736421202..679a5b291 100644 --- a/openbsd-compat/strlcpy.c +++ b/openbsd-compat/strlcpy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */ | 1 | /* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> |
@@ -21,10 +21,6 @@ | |||
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) { |