Skip to content

Commit 7d9899d

Browse files
committed
refactor(lt_hkdf): use shorter goto label names
1 parent bbd8ccb commit 7d9899d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lt_hkdf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ lt_ret_t lt_hkdf(const uint8_t *ck, const uint32_t ck_len, const uint8_t *input,
2727

2828
ret = lt_hmac_sha256(ck, ck_len, input, input_len, tmp);
2929
if (ret != LT_OK) {
30-
goto lt_hkdf_cleanup;
30+
goto cleanup;
3131
}
3232

3333
ret = lt_hmac_sha256(tmp, sizeof(tmp), &one, 1, output_1);
3434
if (ret != LT_OK) {
35-
goto lt_hkdf_cleanup;
35+
goto cleanup;
3636
}
3737

3838
memcpy(helper, output_1, LT_HMAC_SHA256_HASH_LEN); // Copy whole output of SHA256 HMAC.
3939
helper[LT_HMAC_SHA256_HASH_LEN] = 2;
4040

4141
ret = lt_hmac_sha256(tmp, sizeof(tmp), helper, sizeof(helper), output_2);
42-
4342
lt_secure_memzero(helper, sizeof(helper));
44-
lt_hkdf_cleanup:
43+
44+
cleanup:
4545
lt_secure_memzero(tmp, sizeof(tmp));
4646

4747
return ret;

0 commit comments

Comments
 (0)