summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Broz <gmazyland@gmail.com>2013-03-31 11:24:26 +0200
committerMilan Broz <gmazyland@gmail.com>2013-03-31 11:24:26 +0200
commit2a2444b961db398f8a1f147434a2adc3f260fd17 (patch)
tree3df2b20e41133c6288465b89ef1e053b6a8d652f
parent2526ec92bd9e83615be0f1861874ef9e0705869c (diff)
downloadcryptsetup-2a2444b961db398f8a1f147434a2adc3f260fd17.tar.gz
cryptsetup-2a2444b961db398f8a1f147434a2adc3f260fd17.tar.bz2
cryptsetup-2a2444b961db398f8a1f147434a2adc3f260fd17.zip
Fix gcc signed/unsigned warning for key length.
And always use unsigned int declaration.
-rw-r--r--lib/loopaes/loopaes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/loopaes/loopaes.c b/lib/loopaes/loopaes.c
index d9d7a6b..1cb209c 100644
--- a/lib/loopaes/loopaes.c
+++ b/lib/loopaes/loopaes.c
@@ -80,7 +80,7 @@ static int hash_keys(struct crypt_device *cd,
{
const char *hash_name;
char tweak, *key_ptr;
- unsigned i;
+ unsigned int i;
int r;
hash_name = hash_override ?: get_hash(key_len_output);
@@ -134,8 +134,8 @@ int LOOPAES_parse_keyfile(struct crypt_device *cd,
size_t buffer_len)
{
const char *keys[LOOPAES_KEYS_MAX];
- int key_lengths[LOOPAES_KEYS_MAX];
- unsigned i, key_index, key_len, offset;
+ unsigned int key_lengths[LOOPAES_KEYS_MAX];
+ unsigned int i, key_index, key_len, offset;
log_dbg("Parsing loop-AES keyfile of size %d.", buffer_len);