diff options
author | otto <> | 2005-03-30 20:13:52 +0000 |
---|---|---|
committer | otto <> | 2005-03-30 20:13:52 +0000 |
commit | 862e6817b3f445520231811d27e5ba22fa2ed1c7 (patch) | |
tree | a84bc4f2badc3483fb1f0e8f1911cb99ac461521 /src/lib/libc/string/memccpy.c | |
parent | 894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (diff) | |
download | openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.gz openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.bz2 openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.zip |
ansify + deregister. no binary change on i386. ok deraadt@ pat@ moritz@
Diffstat (limited to 'src/lib/libc/string/memccpy.c')
-rw-r--r-- | src/lib/libc/string/memccpy.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/libc/string/memccpy.c b/src/lib/libc/string/memccpy.c index 37496d1c26..265570c5a4 100644 --- a/src/lib/libc/string/memccpy.c +++ b/src/lib/libc/string/memccpy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: memccpy.c,v 1.4 2003/06/02 20:18:38 millert Exp $ */ | 1 | /* $OpenBSD: memccpy.c,v 1.5 2005/03/30 20:13:52 otto Exp $ */ |
2 | 2 | ||
3 | /*- | 3 | /*- |
4 | * Copyright (c) 1990, 1993 | 4 | * Copyright (c) 1990, 1993 |
@@ -33,24 +33,20 @@ | |||
33 | #if 0 | 33 | #if 0 |
34 | static char sccsid[] = "@(#)memccpy.c 8.1 (Berkeley) 6/4/93"; | 34 | static char sccsid[] = "@(#)memccpy.c 8.1 (Berkeley) 6/4/93"; |
35 | #else | 35 | #else |
36 | static char *rcsid = "$OpenBSD: memccpy.c,v 1.4 2003/06/02 20:18:38 millert Exp $"; | 36 | static char *rcsid = "$OpenBSD: memccpy.c,v 1.5 2005/03/30 20:13:52 otto Exp $"; |
37 | #endif | 37 | #endif |
38 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ |
39 | 39 | ||
40 | #include <string.h> | 40 | #include <string.h> |
41 | 41 | ||
42 | void * | 42 | void * |
43 | memccpy(t, f, c, n) | 43 | memccpy(void *t, const void *f, int c, size_t n) |
44 | void *t; | ||
45 | const void *f; | ||
46 | int c; | ||
47 | register size_t n; | ||
48 | { | 44 | { |
49 | 45 | ||
50 | if (n) { | 46 | if (n) { |
51 | register unsigned char *tp = t; | 47 | unsigned char *tp = t; |
52 | register const unsigned char *fp = f; | 48 | const unsigned char *fp = f; |
53 | register unsigned char uc = c; | 49 | unsigned char uc = c; |
54 | do { | 50 | do { |
55 | if ((*tp++ = *fp++) == uc) | 51 | if ((*tp++ = *fp++) == uc) |
56 | return (tp); | 52 | return (tp); |