fix my mistake

This commit is contained in:
Sukchan Lee 2017-03-13 13:14:27 +09:00
parent 0261f4c018
commit 6299883af7
2 changed files with 2 additions and 6 deletions

View File

@ -1355,7 +1355,6 @@ static void ctr128_inc(c_uint8_t *counter)
} while (n);
}
#if 0
static void ctr128_inc_aligned(c_uint8_t *counter)
{
size_t *data, c, d, n;
@ -1381,7 +1380,6 @@ static void ctr128_inc_aligned(c_uint8_t *counter)
c = ((d - c) & ~d) >> (sizeof(size_t) * 8 - 1);
} while (n);
}
#endif
status_t aes_ctr128_encrypt(const c_uint8_t *key,
c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen,
@ -1405,7 +1403,6 @@ status_t aes_ctr128_encrypt(const c_uint8_t *key,
memset(ecount_buf, 0, 16);
nrounds = aes_setup_enc(rk, key, 128);
#if 0
while (n && len)
{
*(out++) = *(in++) ^ ecount_buf[n];
@ -1436,7 +1433,6 @@ status_t aes_ctr128_encrypt(const c_uint8_t *key,
}
}
return CORE_OK;
#endif
/* low-performance for understanding the aes-ctr128 */
while (l < len)

View File

@ -180,7 +180,7 @@ static c_uint32_t _tlv_add_compound(tlv_t **root, tlv_t *parent_tlv,
{
d_trace(1, "\nBUILD %sC#%d T:%d I:%d (vsz=%d) off:%p ",
indent, i, desc->type, desc->instance, desc->vsize,
p + offset);
p + offset2);
if (parent_tlv)
tlv = tlv_embed(parent_tlv,
@ -189,7 +189,7 @@ static c_uint32_t _tlv_add_compound(tlv_t **root, tlv_t *parent_tlv,
tlv = tlv_add(tlv, desc->type, 0, desc->instance, NULL);
r = _tlv_add_compound(&emb_tlv, tlv, desc,
p + offset + sizeof(tlv_header_t), depth + 1);
p + offset2 + sizeof(tlv_header_t), depth + 1);
d_assert(r > 0 && emb_tlv, return 0,
"Can't build compound TLV");
count += 1 + r;