Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161339187
D29535.id86692.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
D29535.id86692.diff
View Options
Index: lib/libc/string/bcopy.c
===================================================================
--- lib/libc/string/bcopy.c
+++ lib/libc/string/bcopy.c
@@ -44,7 +44,7 @@
* sizeof(word) MUST BE A POWER OF TWO
* SO THAT wmask BELOW IS ALL ONES
*/
-typedef int word; /* "word" used for optimal copy speed */
+typedef intptr_t word; /* "word" used for optimal copy speed */
#define wsize sizeof(word)
#define wmask (wsize - 1)
@@ -105,7 +105,7 @@
* Copy whole words, then mop up any trailing bytes.
*/
t = length / wsize;
- TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
+ TLOOP(*(word *)(void *)dst = *(const word *)(const void *)src; src += wsize; dst += wsize);
t = length & wmask;
TLOOP(*dst++ = *src++);
} else {
@@ -126,7 +126,7 @@
TLOOP1(*--dst = *--src);
}
t = length / wsize;
- TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
+ TLOOP(src -= wsize; dst -= wsize; *(word *)(void *)dst = *(const word *)(const void *)src);
t = length & wmask;
TLOOP(*--dst = *--src);
}
@@ -137,3 +137,6 @@
return;
#endif
}
+
+#undef wsize
+#undef wmask
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 3, 11:22 PM (8 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34641402
Default Alt Text
D29535.id86692.diff (1 KB)
Attached To
Mode
D29535: libc/string/bcopy.c: Use intptr_t as the copy type
Attached
Detach File
Event Timeline
Log In to Comment