projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix all UBSAN warnings triggered by tests.
[tinc]
/
src
/
subnet_parse.c
diff --git
a/src/subnet_parse.c
b/src/subnet_parse.c
index
32b7e0a
..
d877c7f
100644
(file)
--- a/
src/subnet_parse.c
+++ b/
src/subnet_parse.c
@@
-186,9
+186,7
@@
static int subnet_compare_ipv6(const subnet_t *a, const subnet_t *b) {
}
int subnet_compare(const subnet_t *a, const subnet_t *b) {
- int result;
-
- result = a->type - b->type;
+ int result = (int)a->type - (int)b->type;
if(result) {
return result;