]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Relay rng return value in nonce plugin
authorTobias Brunner <tobias@strongswan.org>
Mon, 25 Jun 2012 14:07:40 +0000 (16:07 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 16 Jul 2012 12:53:34 +0000 (14:53 +0200)
src/libstrongswan/plugins/nonce/nonce_nonceg.c

index fd1bbe9d822498ef56e7411382be536cc454a7b0..0402e3574a4e6ee9d48e77c5d7b57707d89b55a2 100644 (file)
@@ -38,15 +38,13 @@ struct private_nonce_nonceg_t {
 METHOD(nonce_gen_t, get_nonce, bool,
        private_nonce_nonceg_t *this, size_t size, u_int8_t *buffer)
 {
-       this->rng->get_bytes(this->rng, size, buffer);
-       return TRUE;
+       return this->rng->get_bytes(this->rng, size, buffer);
 }
 
 METHOD(nonce_gen_t, allocate_nonce, bool,
        private_nonce_nonceg_t *this, size_t size, chunk_t *chunk)
 {
-       this->rng->allocate_bytes(this->rng, size, chunk);
-       return TRUE;
+       return this->rng->allocate_bytes(this->rng, size, chunk);
 }
 
 METHOD(nonce_gen_t, destroy, void,