bitvec: cosmetic: init i only once in bitvec_[un]pack()

Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09
This commit is contained in:
Vadim Yanitskiy 2020-02-19 05:10:57 +07:00
parent a500bc3d27
commit c866b326d3
1 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ void bitvec_free(struct bitvec *bv)
* \return number of bytes (= bits) copied */
unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer)
{
unsigned int i = 0;
unsigned int i;
for (i = 0; i < bv->data_len; i++)
buffer[i] = bv->data[i];
@ -444,7 +444,7 @@ unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer)
* \return number of bytes (= bits) copied */
unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer)
{
unsigned int i = 0;
unsigned int i;
for (i = 0; i < bv->data_len; i++)
bv->data[i] = buffer[i];