summaryrefslogtreecommitdiff
path: root/shell/report.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2011-12-04 11:56:39 -0200
committerLeandro Pereira <leandro@hardinfo.org>2011-12-04 11:57:02 -0200
commit8e3c3a5eda7817b012423b3faae788b369119834 (patch)
treed1b3351d15a49dd51a353e6292ef02fe3fec94e0 /shell/report.c
parentdcf0124ea3a61e9235329dbecce92774224e54f8 (diff)
Remove all usages of if (ptr) free(ptr) since free() already performs null-checks.
Diffstat (limited to 'shell/report.c')
-rw-r--r--shell/report.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/shell/report.c b/shell/report.c
index fb87ee23..fb18c346 100644
--- a/shell/report.c
+++ b/shell/report.c
@@ -226,8 +226,7 @@ void report_table(ReportContext * ctx, gchar * text)
static void report_html_header(ReportContext * ctx)
{
- if (ctx->output)
- g_free(ctx->output);
+ g_free(ctx->output);
ctx->output =
g_strdup_printf
@@ -318,8 +317,7 @@ report_html_key_value(ReportContext * ctx, gchar * key, gchar * value)
static void report_text_header(ReportContext * ctx)
{
- if (ctx->output)
- g_free(ctx->output);
+ g_free(ctx->output);
ctx->output = g_strdup("");
}