Compiler warning fixed in prf_plus_t.
authorTobias Brunner <tobias@strongswan.org>
Fri, 25 Nov 2011 10:26:20 +0000 (11:26 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 20 Mar 2012 16:31:07 +0000 (17:31 +0100)
src/libstrongswan/crypto/prf_plus.c

index d932d86..29f6119 100644 (file)
@@ -42,9 +42,9 @@ struct private_prf_plus_t {
        chunk_t seed;
 
        /**
-        * Buffer to store current PRF result.
+        * Octet which will be appended to the seed, 0 if not used
         */
-       chunk_t buffer;
+       u_int8_t counter;
 
        /**
         * Already given out bytes in current buffer.
@@ -52,9 +52,9 @@ struct private_prf_plus_t {
        size_t used;
 
        /**
-        * Octet which will be appended to the seed, 0 if not used
+        * Buffer to store current PRF result.
         */
-       u_int8_t counter;
+       chunk_t buffer;
 };
 
 METHOD(prf_plus_t, get_bytes, void,
@@ -125,8 +125,8 @@ prf_plus_t *prf_plus_create(prf_t *prf, bool counter, chunk_t seed)
                        .destroy = _destroy,
                },
                .prf = prf,
-               .buffer = chunk_alloc(prf->get_block_size(prf)),
                .seed = chunk_clone(seed),
+               .buffer = chunk_alloc(prf->get_block_size(prf)),
        );
 
        if (counter)