summaryrefslogtreecommitdiff
path: root/backend/kvs20xx.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
commit58912f68c2489bcee787599837447e0d64dfd61a (patch)
treedda50aadde35fe152da1a8d50769987ace0f1496 /backend/kvs20xx.h
parentcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff)
New upstream version 1.0.27upstream/1.0.27
Diffstat (limited to 'backend/kvs20xx.h')
-rw-r--r--backend/kvs20xx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/kvs20xx.h b/backend/kvs20xx.h
index 9bc833d..442f1c7 100644
--- a/backend/kvs20xx.h
+++ b/backend/kvs20xx.h
@@ -168,6 +168,12 @@ swap_bytes32 (u32 x)
(x & (u32) 0x0000ff00UL) << 8 | (x & (u32) 0x00ff0000UL) >> 8;
}
+static inline void
+copy16 (u8 * p, u16 x)
+{
+ memcpy (p, (u8 *) &x, sizeof (x));
+}
+
#if __BYTE_ORDER == __BIG_ENDIAN
static inline void
set24 (u8 * p, u32 x)