ref: 604e62c987a3185764f3ecf69ab3529afbed6e39
parent: b8be5f6439b5e9d8ae12ae8634b5e9d69b354764
author: Marvin Scholz <epirat07@gmail.com>
date: Sat Sep 29 10:26:50 EDT 2018
checkasm: Fix comparison of different int signs Casting here should be safe as the case name_length < 0 is already checked before.
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -474,7 +474,7 @@
const int name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);
va_end(arg);
- if (!func || name_length <= 0 || name_length >= sizeof(name_buf))
+ if (!func || name_length <= 0 || (size_t)name_length >= sizeof(name_buf))
return NULL;
state.current_func = get_func(&state.funcs, name_buf);