diff options
author | Walter Harms <wharms@bfs.de> | 2019-08-19 17:49:40 +0200 |
---|---|---|
committer | Walter Harms <wharms@bfs.de> | 2019-08-19 17:49:40 +0200 |
commit | 69291d6837b11dec8ebde337d4535ea1ac025cac (patch) | |
tree | d97cabdf71a43f85bf25322e3061c5208357b63f | |
parent | ba98dbfd00d6d3860e3cac6246f4af408a7be858 (diff) |
no need-to-check argument for XFree
XFree() will accept NULL no need to check
Signed-off-by: Walter Harms <wharms@bfs.de>
-rw-r--r-- | xrestop.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -187,7 +187,7 @@ window_get_pid(XResTopApp *app, Window win) result = *data; } - if (data) XFree(data); + XFree(data); return result; } @@ -209,7 +209,7 @@ window_get_utf8_name(XResTopApp *app, Window win) if (result != Success || str == NULL) { - if (str) XFree (str); + XFree (str); return NULL; } @@ -281,7 +281,7 @@ xrestop_client_new(XResTopApp *app) static void xrestop_client_free(XResTopClient *client) { - if (client->identifier) XFree (client->identifier); + XFree (client->identifier); free(client); } @@ -363,7 +363,7 @@ recurse_win_tree(XResTopApp *app, XResTopClient *client, Window win_top) break; } - if (children) XFree ((char *)children); + XFree ((char *)children); return w; } @@ -458,7 +458,7 @@ xrestop_client_get_stats(XResTopApp *app, XResTopClient *client) client->other_bytes += client->n_other * 24; cleanup: - if (types) XFree(types); + XFree(types); return; } @@ -496,7 +496,7 @@ xrestop_populate_client_data(XResTopApp *app) cleanup: - if (clients) XFree(clients); + XFree(clients); } static void |