X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e480573a5ff59ce2ae78793427e61b85dce7eef1..c365614a9864ce27a52b7669301e0f1287dee02d:/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 */