[LTP] [PATCH v3 1/2] tst_af_alg: Moving tst_res(TCONF) to tst_have_alg()
Cyril Hrubis
chrubis@suse.cz
Wed Jan 5 15:41:08 CET 2022
Hi!
> +bool tst_have_alg(const char *algtype, const char *algname)
> +{
> + int ret;
> +
> + ret = tst_try_alg(algtype, algname);
> +
> + switch (ret) {
> + case 0:
> + return true;
> + case ENOENT:
> + tst_res(TCONF, "kernel doesn't have %s algorithm '%s'",
> + algtype, algname);
> + return false;
> + default:
> + errno = ret;
> + tst_brk(TBROK | TERRNO,
> + "unexpected error binding AF_ALG socket to %s algorithm '%s'",
> + algtype, algname);
> + return false;
> + break;
This break is useless, otherwise:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list