Appease GCC's uninitialized value warning.
GCC notices that one function believes < 0 is the error while the other believes it's != 0. unw_get_reg never returns positive, but match them. Change-Id: I40af614e6b1400bf3d398bd32beb6d3ec702bc11 Reviewed-on: https://boringssl-review.googlesource.com/c/34985 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com>
This commit is contained in:
parent
a367d9267f
commit
98ad4d77e3
@ -446,7 +446,7 @@ class UnwindCursor {
|
|||||||
int GetReg(crypto_word_t *out, unw_regnum_t reg) {
|
int GetReg(crypto_word_t *out, unw_regnum_t reg) {
|
||||||
unw_word_t val;
|
unw_word_t val;
|
||||||
int ret = unw_get_reg(&cursor_, reg, &val);
|
int ret = unw_get_reg(&cursor_, reg, &val);
|
||||||
if (ret == 0) {
|
if (ret >= 0) {
|
||||||
static_assert(sizeof(crypto_word_t) == sizeof(unw_word_t),
|
static_assert(sizeof(crypto_word_t) == sizeof(unw_word_t),
|
||||||
"crypto_word_t and unw_word_t are inconsistent");
|
"crypto_word_t and unw_word_t are inconsistent");
|
||||||
*out = val;
|
*out = val;
|
||||||
|
Loading…
Reference in New Issue
Block a user