diff options
author | Tim Kientzle <kientzle@acm.org> | 2012-11-30 21:48:48 -0800 |
---|---|---|
committer | Tim Kientzle <kientzle@acm.org> | 2012-11-30 21:48:48 -0800 |
commit | 3a9718dee140838b92c0ab50208c0c0f0834777b (patch) | |
tree | 74b76825d30b65107010c0cc68d9899773fecc9c /tar/util.c | |
parent | cfa358a99850cb21b48eff25deffd8c9131b00d8 (diff) | |
download | libarchive-3a9718dee140838b92c0ab50208c0c0f0834777b.tar.gz |
Fix util.c compile, remove extraneous NULL check.
Diffstat (limited to 'tar/util.c')
-rw-r--r-- | tar/util.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); } /* |