X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e480573a5ff59ce2ae78793427e61b85dce7eef1..8c6fa3fbaccc22127280bf77a48fab5a3ee0716e:/stglibs/smux.lib/NativeInteger.c diff --git a/stglibs/smux.lib/NativeInteger.c b/stglibs/smux.lib/NativeInteger.c index 34599f61..db234c8b 100644 --- a/stglibs/smux.lib/NativeInteger.c +++ b/stglibs/smux.lib/NativeInteger.c @@ -283,14 +283,13 @@ int NativeInteger_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const long *native = (const long *)sptr; - char scratch[32]; /* Enough for 64-bit int */ - int ret; (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(native) { - ret = snprintf(scratch, sizeof(scratch), "%ld", *native); + char scratch[32]; /* Enough for 64-bit int */ + int ret = snprintf(scratch, sizeof(scratch), "%ld", *native); assert(ret > 0 && (size_t)ret < sizeof(scratch)); return (cb(scratch, ret, app_key) < 0) ? -1 : 0; } else {