Skip to content

Commit 61ab302

Browse files
committed
FIX: avoiding compiler warnings
1 parent a969582 commit 61ab302

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/n-crypt.c

+2
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ static uECC_Curve get_ecc_curve(REBCNT curve_type) {
828828
ctx_ser = VAL_HANDLE_DATA(val_ctx);
829829
if (VAL_HANDLE_TYPE(val_ctx) != SYM_CHACHA20 || ctx_ser == NULL || SERIES_TAIL(ctx_ser) != sizeof(chacha20_ctx)){
830830
Trap0(RE_INVALID_HANDLE);
831+
return R_NONE; // avoid wornings later
831832
}
832833
}
833834

@@ -852,6 +853,7 @@ static uECC_Curve get_ecc_curve(REBCNT curve_type) {
852853

853854
if (VAL_HANDLE_TYPE(val_ctx) != SYM_CHACHA20 || ctx_ser == NULL || SERIES_TAIL(ctx_ser) != sizeof(chacha20_ctx)){
854855
Trap0(RE_INVALID_HANDLE);
856+
return R_NONE;
855857
}
856858

857859
len = VAL_LEN(val_data);

0 commit comments

Comments
 (0)