summaryrefslogtreecommitdiff
path: root/client/bankid.c
diff options
context:
space:
mode:
authorcybjit <cybjit@gmail.com>2014-05-10 20:54:15 +0200
committercybjit <cybjit@gmail.com>2014-05-10 21:29:52 +0200
commit173724ba04c33aa0593f9b9e7b2865bc7b72cd97 (patch)
tree0247d2cde437d90ad994f12b1377664935d084a0 /client/bankid.c
parent7836f4648f6fb63e1936cdded8fed51ee98471ed (diff)
downloadfribid-173724ba04c33aa0593f9b9e7b2865bc7b72cd97.tar.gz
fribid-173724ba04c33aa0593f9b9e7b2865bc7b72cd97.tar.bz2
fribid-173724ba04c33aa0593f9b9e7b2865bc7b72cd97.zip
do not mix TokenError and BankIDError
found with clang: bankid.c:245:25: warning: implicit conversion from enumeration type 'TokenError' to different enumeration type 'BankIDError' [-Wenum-conversion] BankIDError error = backend_storeCertificates(p7data, length, hostname); ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'client/bankid.c')
-rw-r--r--client/bankid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/bankid.c b/client/bankid.c
index 98e24a9..9ea36ca 100644
--- a/client/bankid.c
+++ b/client/bankid.c
@@ -242,7 +242,13 @@ BankIDError bankid_storeCertificates(const char *certs, const char *hostname) {
if (!p7data) return BIDERR_InternalError;
- BankIDError error = backend_storeCertificates(p7data, length, hostname);
+ TokenError storeerror = backend_storeCertificates(p7data, length, hostname);
+ BankIDError error;
+ if (storeerror) {
+ error = BIDERR_InternalError;
+ } else {
+ error = BIDERR_OK;
+ }
free(p7data);
return error;