* libc/string/memset.c (memset): Move initialization of 'd' earlier in

function.
This commit is contained in:
Christopher Faylor 2002-11-26 18:11:51 +00:00
parent 5362be5926
commit b3cc01b02b
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-11-26 Christopher Faylor <cgf@redhat.com>
* libc/string/memset.c (memset): Move initialization of 'd' earlier in
function.
2002-11-25 Christopher Faylor <cgf@redhat.com>
* libc/string/memset.c (memset): Minor optimization: Use new 'd'

View File

@ -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;