fix indent error

This commit is contained in:
Thomas von Dein
2016-10-16 22:14:25 +02:00
parent 28981bdbb1
commit 2ad190e921

View File

@@ -55,27 +55,27 @@ char *zmq_z85_encode (char *dest, uint8_t *data, size_t size)
if (size % 4 != 0) if (size % 4 != 0)
return NULL; /* !assert */ return NULL; /* !assert */
unsigned int char_nbr = 0; unsigned int char_nbr = 0;
unsigned int byte_nbr = 0; unsigned int byte_nbr = 0;
uint32_t value = 0; uint32_t value = 0;
while (byte_nbr < size) { while (byte_nbr < size) {
/* Accumulate value in base 256 (binary) */ /* Accumulate value in base 256 (binary) */
value = value * 256 + data [byte_nbr++]; value = value * 256 + data [byte_nbr++];
if (byte_nbr % 4 == 0) { if (byte_nbr % 4 == 0) {
/* Output value in base 85 */ /* Output value in base 85 */
unsigned int divisor = 85 * 85 * 85 * 85; unsigned int divisor = 85 * 85 * 85 * 85;
while (divisor) { while (divisor) {
dest [char_nbr++] = encoder [value / divisor % 85]; dest [char_nbr++] = encoder [value / divisor % 85];
divisor /= 85; divisor /= 85;
} }
value = 0; value = 0;
}
} }
if (char_nbr != size * 5 / 4) }
return NULL; /* !assert */ if (char_nbr != size * 5 / 4)
return NULL; /* !assert */
dest [char_nbr] = 0; dest [char_nbr] = 0;
return dest; return dest;
} }