diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/string/memset.c | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libc/string/memset.c b/src/lib/libc/string/memset.c index db32866a0e..61709c139d 100644 --- a/src/lib/libc/string/memset.c +++ b/src/lib/libc/string/memset.c  | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: memset.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ | 1 | /* $OpenBSD: memset.c,v 1.6 2008/03/15 21:40:39 ray Exp $ */ | 
| 2 | /*- | 2 | /*- | 
| 3 | * Copyright (c) 1990 The Regents of the University of California. | 3 | * Copyright (c) 1990 The Regents of the University of California. | 
| 4 | * All rights reserved. | 4 | * All rights reserved. | 
| @@ -36,12 +36,11 @@ | |||
| 36 | void * | 36 | void * | 
| 37 | memset(void *dst, int c, size_t n) | 37 | memset(void *dst, int c, size_t n) | 
| 38 | { | 38 | { | 
| 39 | |||
| 40 | if (n != 0) { | 39 | if (n != 0) { | 
| 41 | char *d = dst; | 40 | unsigned char *d = dst; | 
| 42 | 41 | ||
| 43 | do | 42 | do | 
| 44 | *d++ = c; | 43 | *d++ = (unsigned char)c; | 
| 45 | while (--n != 0); | 44 | while (--n != 0); | 
| 46 | } | 45 | } | 
| 47 | return (dst); | 46 | return (dst); | 
