mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
test_assert is always in affect: no need for extra gotos
This commit is contained in:
parent
3c30417339
commit
3763959ef0
@ -291,10 +291,8 @@ do_parse_test(uint8_t *plaintext, size_t plaintext_len, int phase)
|
||||
/* Get a key */
|
||||
k = crypto_pk_new();
|
||||
test_assert(k);
|
||||
if (!k) goto done;
|
||||
r = crypto_pk_read_private_key_from_string(k, AUTHORITY_SIGNKEY_1, -1);
|
||||
test_assert(!r);
|
||||
if (r) goto done;
|
||||
|
||||
/* Get digest for future comparison */
|
||||
r = crypto_pk_get_digest(k, digest);
|
||||
@ -306,7 +304,6 @@ do_parse_test(uint8_t *plaintext, size_t plaintext_len, int phase)
|
||||
k, (void **)(&cell));
|
||||
test_assert(r > 0);
|
||||
test_assert(cell);
|
||||
if (!(cell && r > 0)) goto done;
|
||||
cell_len = r;
|
||||
|
||||
/* Do early parsing */
|
||||
|
Loading…
Reference in New Issue
Block a user