Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151271554
D29536.id86693.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29536.id86693.diff
View Options
Index: lib/libc/string/memset.c
===================================================================
--- lib/libc/string/memset.c
+++ lib/libc/string/memset.c
@@ -42,7 +42,7 @@
#include <limits.h>
-#define wsize sizeof(u_int)
+#define wsize sizeof(u_long)
#define wmask (wsize - 1)
#ifdef BZERO
@@ -67,7 +67,7 @@
{
size_t t;
#ifndef BZERO
- u_int c;
+ u_long c;
#endif
u_char *dst;
@@ -95,12 +95,12 @@
#ifndef BZERO
if ((c = (u_char)c0) != 0) { /* Fill the word. */
- c = (c << 8) | c; /* u_int is 16 bits. */
-#if UINT_MAX > 0xffff
- c = (c << 16) | c; /* u_int is 32 bits. */
+ c = (c << 8) | c; /* u_long is 16 bits. */
+#if ULONG_MAX > 0xffff
+ c = (c << 16) | c; /* u_long is 32 bits. */
#endif
-#if UINT_MAX > 0xffffffff
- c = (c << 32) | c; /* u_int is 64 bits. */
+#if ULONG_MAX > 0xffffffff
+ c = (c << 32) | c; /* u_long is 64 bits. */
#endif
}
#endif
@@ -116,7 +116,7 @@
/* Fill words. Length was >= 2*words so we know t >= 1 here. */
t = length / wsize;
do {
- *(u_int *)dst = WIDEVAL;
+ *(u_long *)(void *)dst = WIDEVAL;
dst += wsize;
} while (--t != 0);
@@ -128,3 +128,6 @@
} while (--t != 0);
RETURN;
}
+
+#undef wsize
+#undef wmask
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 5:59 AM (6 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31081361
Default Alt Text
D29536.id86693.diff (1 KB)
Attached To
Mode
D29536: libc/string/memset.c: Use unsigned long for stores
Attached
Detach File
Event Timeline
Log In to Comment