Skip to content
Snippets Groups Projects
Commit 8c94048f authored by Karel Slaný's avatar Karel Slaný Committed by Ondřej Surý
Browse files

Replaced one assertion check.

parent 304e6ccd
Branches
Tags
No related merge requests found
......@@ -138,10 +138,9 @@ int kr_request_put_cookie(const struct kr_cookie_comp *clnt_comp,
assert((clnt_comp->alg_id >= 0) && kr_cc_algs[clnt_comp->alg_id] &&
kr_cc_algs[clnt_comp->alg_id]->gen_func);
cc_len = kr_cc_algs[clnt_comp->alg_id]->gen_func(&input, cc, cc_len);
if (cc_len == 0) {
if (cc_len != KNOT_OPT_COOKIE_CLNT) {
return kr_error(EINVAL);
}
assert(cc_len == KNOT_OPT_COOKIE_CLNT);
const uint8_t *cached_cookie = peek_and_check_cc(cookie_cache,
srvr_sa, cc, cc_len);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment