OSDN Git Service

kwalletd: fix a compiler warning
authorIvailo Monev <xakepa10@gmail.com>
Sun, 14 Jun 2015 10:23:37 +0000 (13:23 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 14 Jun 2015 10:23:37 +0000 (13:23 +0300)
kwalletd/backend/cbc.cc

index 772f3de..da169b2 100644 (file)
@@ -85,8 +85,8 @@ void CipherBlockChain::initRegister() {
 
 int CipherBlockChain::encrypt(void *block, int len)
 {
+    int rc = -1;
     if (_cipher && !_reader) {
-        int rc;
 
         _writer |= 1;
 
@@ -116,7 +116,7 @@ int CipherBlockChain::encrypt(void *block, int len)
 
         return rc;
     }
-    return -1;
+    return rc;
 }
 
 // This is the old decrypt method, that was decrypting using ECB