Skip to content
Snippets Groups Projects
Commit 0f675e80 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Gah. Only write at one width.

parent 6df99aa6
Branches
Tags
No related merge requests found
......@@ -20,9 +20,9 @@
static inline void EB_mWRITE(uint8_t* wptr, eb_data_t val, int alignment) {
switch (alignment) {
case 2: *(uint16_t*)wptr = htobe16(val);
case 4: *(uint32_t*)wptr = htobe32(val);
case 8: *(uint64_t*)wptr = htobe64(val);
case 2: *(uint16_t*)wptr = htobe16(val); break;
case 4: *(uint32_t*)wptr = htobe32(val); break;
case 8: *(uint64_t*)wptr = htobe64(val); break;
}
}
......
......@@ -28,9 +28,9 @@ static inline eb_data_t EB_LOAD(uint8_t* rptr, int alignment) {
static inline void EB_WRITE(uint8_t* wptr, eb_data_t val, int alignment) {
switch (alignment) {
case 2: *(uint16_t*)wptr = htobe16(val);
case 4: *(uint32_t*)wptr = htobe32(val);
case 8: *(uint64_t*)wptr = htobe64(val);
case 2: *(uint16_t*)wptr = htobe16(val); break;
case 4: *(uint32_t*)wptr = htobe32(val); break;
case 8: *(uint64_t*)wptr = htobe64(val); break;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment