summaryrefslogtreecommitdiff
path: root/tar/util.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@acm.org>2012-11-30 21:48:48 -0800
committerTim Kientzle <kientzle@acm.org>2012-11-30 21:48:48 -0800
commit3a9718dee140838b92c0ab50208c0c0f0834777b (patch)
tree74b76825d30b65107010c0cc68d9899773fecc9c /tar/util.c
parentcfa358a99850cb21b48eff25deffd8c9131b00d8 (diff)
downloadlibarchive-3a9718dee140838b92c0ab50208c0c0f0834777b.tar.gz
Fix util.c compile, remove extraneous NULL check.
Diffstat (limited to 'tar/util.c')
-rw-r--r--tar/util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tar/util.c b/tar/util.c
index 34b62718..e311094e 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);
}
/*