Re: [PATCH] cleanup libssl/src/crypto/asn1/a_{int,enum}.c

2014-04-28 Thread Miod Vallat
* remove unnecessary temp variable d * move loop counter j in for() header * fix prototype for memcpy * make calculation of actual length in BN_to_ASN1_ENUMERATED more transparent This code still looks rather odd, it uses a temporary buffer to first convert the number into a minimal

Re: [PATCH] cleanup libssl/src/crypto/asn1/a_{int,enum}.c

2014-04-28 Thread Dirk Engling
On 28.04.14 23:05, Miod Vallat wrote: I'm not too fond of this kind of change - the compiler does a good job at merging or optimizing temporary variables. I disagree. I stopped writing code for the compiler when I got my first pubic hair. Now I think that useless introduction of non-obviously

[PATCH] cleanup libssl/src/crypto/asn1/a_{int,enum}.c

2014-04-22 Thread Dirk Engling
* remove unnecessary temp variable d * move loop counter j in for() header * fix prototype for memcpy * make calculation of actual length in BN_to_ASN1_ENUMERATED more transparent This code still looks rather odd, it uses a temporary buffer to first convert the number into a minimal little