fix compiler warning

This commit is contained in:
Steffen Jaeckel 2017-03-31 00:57:22 +02:00
parent 83780d4764
commit 1f0daf1eff

View File

@ -70,19 +70,19 @@ int der_encode_generalizedtime(ltc_generalizedtime *gtime,
STORE_V(gtime->ss);
if (gtime->fs) {
unsigned long div;
unsigned long divisor;
unsigned fs = gtime->fs;
unsigned len = 0;
out[x++] = der_ia5_char_encode('.');
div = 1;
divisor = 1;
do {
fs /= 10;
div *= 10;
divisor *= 10;
len++;
} while(fs != 0);
while (len-- > 1) {
out[x++] = der_ia5_char_encode(baseten[(gtime->fs/div) % 10]);
div /= 10;
out[x++] = der_ia5_char_encode(baseten[(gtime->fs/divisor) % 10]);
divisor /= 10;
}
out[x++] = der_ia5_char_encode(baseten[gtime->fs % 10]);
}