Page MenuHomeFreeBSD

D54399.id168718.diff
No OneTemporary

D54399.id168718.diff

diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c
--- a/lib/libc/string/swab.c
+++ b/lib/libc/string/swab.c
@@ -6,11 +6,13 @@
#include <unistd.h>
#include <sys/endian.h>
+typedef uint16_t __aligned(1) unaligned16_t;
+
void
swab(const void * __restrict from, void * __restrict to, ssize_t len)
{
- const uint16_t *f __aligned(1) = from;
- uint16_t *t __aligned(1) = to;
+ const unaligned16_t *f = from;
+ unaligned16_t *t = to;
/*
* POSIX says overlapping copy behavior is undefined, however many

File Metadata

Mime Type
text/plain
Expires
Tue, Jul 14, 12:14 PM (19 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35065094
Default Alt Text
D54399.id168718.diff (522 B)

Event Timeline