From: Klas Lindfors Date: Mon, 17 Sep 2012 13:16:26 +0000 (+0200) Subject: break up declaration and use to remove warning X-Git-Tag: v1.8.0~65 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=074f8dcdf43883eb5a8a0aa6cc74031c58f23df0;p=yubikey-personalization break up declaration and use to remove warning --- diff --git a/ykpers.c b/ykpers.c index 9ffc025..35f2bea 100644 --- a/ykpers.c +++ b/ykpers.c @@ -375,6 +375,7 @@ int ykp_AES_key_from_passphrase(YKP_CONFIG *cfg, const char *passphrase, int ykp_construct_ndef_uri(YKNDEF *ndef, const char *uri) { int num_identifiers = sizeof(ndef_identifiers) / sizeof(char*); + size_t data_length; int indx = 0; for(; indx < num_identifiers; indx++) { size_t len = strlen(ndef_identifiers[indx]); @@ -383,7 +384,7 @@ int ykp_construct_ndef_uri(YKNDEF *ndef, const char *uri) break; } } - size_t data_length = strlen(uri); + data_length = strlen(uri); if(data_length + 1 > NDEF_DATA_SIZE) { ykp_errno = YKP_EINVAL; return 1;