projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move local variable declaration closer to its use.
[cparser]
/
type_hash.c
diff --git
a/type_hash.c
b/type_hash.c
index
88de01c
..
ad0732f
100644
(file)
--- a/
type_hash.c
+++ b/
type_hash.c
@@
-98,7
+98,8
@@
static unsigned hash_function_type(const function_type_t *type)
result ^= hash_ptr(parameter->type);
parameter = parameter->next;
}
result ^= hash_ptr(parameter->type);
parameter = parameter->next;
}
- result ^= hash_ptr(type->linkage);
+ result += type->linkage;
+ result += type->calling_convention;
return result;
}
return result;
}
@@
-210,6
+211,8
@@
static bool function_types_equal(const function_type_t *type1,
return false;
if (type1->linkage != type2->linkage)
return false;
return false;
if (type1->linkage != type2->linkage)
return false;
+ if (type1->calling_convention != type2->calling_convention)
+ return false;
function_parameter_t *param1 = type1->parameters;
function_parameter_t *param2 = type2->parameters;
function_parameter_t *param1 = type1->parameters;
function_parameter_t *param2 = type2->parameters;