# HG changeset patch # User Matti Hamalainen # Date 1578766704 -7200 # Node ID e315bed7d7916bb5b86174d76060667de779d588 # Parent 6d0143e43edf4b9bf6ff0d560133996c97cf2a17 Minor cleanup. diff -r 6d0143e43edf -r e315bed7d791 sidinfo.c --- a/sidinfo.c Sat Jan 11 20:12:00 2020 +0200 +++ b/sidinfo.c Sat Jan 11 20:18:24 2020 +0200 @@ -471,11 +471,10 @@ th_vprintf_ctx ctx; ctx.size = 128; - ctx.buf = th_malloc(ctx.size); - ctx.pos = 0; + ctx.pos = 0; ctx.ipos = 0; - if (ctx.buf == NULL) + if ((ctx.buf = th_malloc(ctx.size)) == NULL) return NULL; if (siItemFormatStrPrintDo(&ctx, siItemFormatStrPutCH, fmt, otype, d_str, d_int) <= 0)