mirror of https://github.com/omar-polo/gmid.git
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:
parent
cf5cf697a8
commit
b90faa1605
8
crypto.c
8
crypto.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue