cert_create: merge successive i2d_ASN1_INTEGER() calls
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 6 Feb 2017 10:00:11 +0000 (19:00 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 11 Feb 2017 03:59:25 +0000 (12:59 +0900)
commit559eb8b79afb03a3840b90f5070df692a693de05
tree740a3dbf49269d99e3faee8719f50c2e5bdcd033
parent762f1ebe8d1b26e78cd4923f832a611c8a5f0a89
cert_create: merge successive i2d_ASN1_INTEGER() calls

The ext_new_nvcounter() function calls i2d_ASN1_INTEGER() twice;
the first call to get the return value "sz", and the second one
for writing data into the buffer.  This is actually redundant.
We can do both by one function call.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
tools/cert_create/src/ext.c