simplify check

brought to my attention by gcc who isn't smart enough to figure out
that `ret' is always set.
This commit is contained in:
Omar Polo 2023-06-13 17:10:13 +00:00
parent cf5cf697a8
commit b90faa1605
1 changed files with 2 additions and 6 deletions

View File

@ -145,16 +145,12 @@ crypto_dispatch_server(int fd, struct privsep_proc *p, struct imsg *imsg)
if ((to = calloc(1, req.tlen)) == NULL)
fatal("calloc");
switch (imsg->hdr.type) {
case IMSG_CRYPTO_RSA_PRIVENC:
if (imsg->hdr.type == IMSG_CRYPTO_RSA_PRIVENC)
ret = RSA_private_encrypt(req.flen, from,
to, rsa, req.padding);
break;
case IMSG_CRYPTO_RSA_PRIVDEC:
else
ret = RSA_private_decrypt(req.flen, from,
to, rsa, req.padding);
break;
}
memset(&res, 0, sizeof(res));
res.id = req.id;