From: Tim Kientzle Date: Sat, 1 Dec 2012 05:48:48 +0000 (-0800) Subject: Fix util.c compile, remove extraneous NULL check. X-Git-Tag: v3.1.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a9718dee140838b92c0ab50208c0c0f0834777b;p=thirdparty%2Flibarchive.git Fix util.c compile, remove extraneous NULL check. --- diff --git a/tar/util.c b/tar/util.c index 34b62718b..e311094eb 100644 --- a/tar/util.c +++ b/tar/util.c @@ -123,7 +123,7 @@ safe_fprintf(FILE *f, const char *fmt, ...) else if (fmtbuff_length < 1000000) fmtbuff_length += fmtbuff_length / 4; else { - length = old_length; + length = fmtbuff_length; fmtbuff_heap[length-1] = '\0'; break; } @@ -191,8 +191,7 @@ safe_fprintf(FILE *f, const char *fmt, ...) fprintf(f, "%s", outbuff); /* If we allocated a heap-based formatting buffer, free it now. */ - if (fmtbuff_heap != NULL) - free(fmtbuff_heap); + free(fmtbuff_heap); } /*