summaryrefslogtreecommitdiffstats
path: root/newlib/libc/string/memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string/memset.c')
-rw-r--r--newlib/libc/string/memset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/string/memset.c b/newlib/libc/string/memset.c
index 41b7d03ba..6f98cac62 100644
--- a/newlib/libc/string/memset.c
+++ b/newlib/libc/string/memset.c
@@ -59,13 +59,13 @@ _DEFUN (memset, (m, c, n),
int i;
unsigned long buffer;
unsigned long *aligned_addr;
+ unsigned int d = c & 0xff;
if (!TOO_SMALL (n) && !UNALIGNED (m))
{
/* If we get this far, we know that n is large and m is word-aligned. */
/* To avoid sign extention, copy C to an unsigned variable. */
- unsigned int d = c & 0xff;
aligned_addr = (unsigned long*)m;