]> git.stg.codes - stg.git/blobdiff - stglibs/smux.lib/NativeInteger.c
Merge branch 'stg-2.409-radius'
[stg.git] / stglibs / smux.lib / NativeInteger.c
index 34599f6186cd77d38106e171ec3b24cb29638afa..db234c8b41dfd056e6c8beb18c564d65889cf6aa 100644 (file)
@@ -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 {