projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run shfmt as part of the reformat target.
[tinc]
/
src
/
utils.c
diff --git
a/src/utils.c
b/src/utils.c
index
6104fad
..
4150d92
100644
(file)
--- a/
src/utils.c
+++ b/
src/utils.c
@@
-176,7
+176,7
@@
size_t b64encode_tinc_urlsafe(const void *src, char *dst, size_t length) {
return b64encode_tinc_internal(src, dst, length, base64_urlsafe);
}
return b64encode_tinc_internal(src, dst, length, base64_urlsafe);
}
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
const char *winerror(int err) {
static char buf[1024], *ptr;
const char *winerror(int err) {
static char buf[1024], *ptr;
@@
-195,17
+195,6
@@
const char *winerror(int err) {
}
#endif
}
#endif
-unsigned int bitfield_to_int(const void *bitfield, size_t size) {
- unsigned int value = 0;
-
- if(size > sizeof(value)) {
- size = sizeof(value);
- }
-
- memcpy(&value, bitfield, size);
- return value;
-}
-
bool check_id(const char *id) {
if(!id || !*id) {
return false;
bool check_id(const char *id) {
if(!id || !*id) {
return false;