projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-controller: Document how to use with management protocol.
[openvswitch]
/
lib
/
hash.h
diff --git
a/lib/hash.h
b/lib/hash.h
index 3f140381c36104ce22eb558e08a9ea75ab52d6a4..5f6409cb135e71ef25ab9dfdefb36ad273673f78 100644
(file)
--- a/
lib/hash.h
+++ b/
lib/hash.h
@@
-83,8
+83,11
@@
static inline uint32_t hash_boolean(bool x, uint32_t basis)
static inline uint32_t hash_double(double x, uint32_t basis)
{
static inline uint32_t hash_double(double x, uint32_t basis)
{
- BUILD_ASSERT_DECL(sizeof x == 8);
- return hash_2words((const uint32_t *) &x, basis);
+ uint32_t value[2];
+ BUILD_ASSERT_DECL(sizeof x == sizeof value);
+
+ memcpy(value, &x, sizeof value);
+ return hash_2words(value, basis);
}
static inline uint32_t hash_pointer(const void *p, uint32_t basis)
}
static inline uint32_t hash_pointer(const void *p, uint32_t basis)