projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove Ivo's old email addresses.
[tinc]
/
lib
/
utils.c
diff --git
a/lib/utils.c
b/lib/utils.c
index
56bcb0b
..
c5c8a9a
100644
(file)
--- a/
lib/utils.c
+++ b/
lib/utils.c
@@
-1,7
+1,7
@@
/*
utils.c -- gathering of some stupid small functions
/*
utils.c -- gathering of some stupid small functions
- Copyright (C) 1999-2005 Ivo Timmermans
<zarq@iname.com>
- 2000-200
6
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 1999-2005 Ivo Timmermans
+ 2000-200
9
Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-100,3
+100,10
@@
const char *winerror(int err) {
}
#endif
}
#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;
+}