Mimi Zohar <zohar@xxxxxxxxxxxxx> wrote: > Looking the patch over again, do you prefer the duplicate call or > defining a local variable and using the ternary conditional operator > ("?:") like this: > > bool rsa = false; > > if (!(sig->encoding) && strcmp(pkey->pkey_algo, "rsa") == 0) > rsa = true; > > ret = software_key_determine_akcipher(rsa ? "pkcs1" : sig->encoding, > sig->hash_algo, > pkey, alg_name); Might be better to do: const char *encoding = sig->encoding; if (!encoding && strcmp(pkey->pkey_algo, "rsa") == 0) encoding = "pkcs1"; ret = software_key_determine_akcipher(encoding, ... David