finish refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <libowfat/fmt.h>
|
||||
#include <assert.h>
|
||||
|
||||
static size_t asn1derlengthbytesneeded(unsigned long long l) {
|
||||
size_t needed;
|
||||
@@ -15,9 +16,7 @@ size_t fmt_asn1derlength(char* dest,unsigned long long l) {
|
||||
if (dest) *dest=l&0x7f;
|
||||
return 1;
|
||||
}
|
||||
for (i=1; i<sizeof l; ++i)
|
||||
if (!(l>>(i*8)))
|
||||
break;
|
||||
i=asn1derlengthbytesneeded(l);
|
||||
if (dest) {
|
||||
size_t j=i;
|
||||
*dest=(char)(0x80+i); ++dest;
|
||||
|
||||
Reference in New Issue
Block a user