X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e480573a5ff59ce2ae78793427e61b85dce7eef1..11db4a3e1d499a2e2da4cf312db1655eb0f055fc:/stglibs/smux.lib/OBJECT_IDENTIFIER.c diff --git a/stglibs/smux.lib/OBJECT_IDENTIFIER.c b/stglibs/smux.lib/OBJECT_IDENTIFIER.c index b1666dc6..d0367f0f 100644 --- a/stglibs/smux.lib/OBJECT_IDENTIFIER.c +++ b/stglibs/smux.lib/OBJECT_IDENTIFIER.c @@ -182,7 +182,6 @@ OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add, asn_app_consume_bytes_f *cb, void *app_key) { char scratch[64]; /* Conservative estimate */ unsigned long accum; /* Bits accumulator */ - char *p; /* Position in the scratch buffer */ if(OBJECT_IDENTIFIER_get_single_arc(arcbuf, arclen, add, &accum, sizeof(accum))) @@ -190,9 +189,8 @@ OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add, if(accum) { ssize_t len; + char *p = scratch + sizeof(scratch); /* Position in the scratch buffer */ - /* Fill the scratch buffer in reverse. */ - p = scratch + sizeof(scratch); for(; accum; accum /= 10) *(--p) = (char)(accum % 10) + 0x30; /* Put a digit */