Page MenuHomeFreeBSD

D29535.id86692.diff
No OneTemporary

D29535.id86692.diff

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

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)

Event Timeline