projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' into 1.1
[tinc]
/
lib
/
utils.c
diff --git
a/lib/utils.c
b/lib/utils.c
index
beabfea
..
1d46630
100644
(file)
--- a/
lib/utils.c
+++ b/
lib/utils.c
@@
-96,3
+96,10
@@
const char *winerror(int err) {
}
#endif
+unsigned int bitfield_to_int(void *bitfield, size_t size) {
+ unsigned int value = 0;
+ if(size > sizeof value)
+ size = sizeof value;
+ memcpy(&value, bitfield, size);
+ return value;
+}