diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-11-17 15:23:17 -0800 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-11-18 16:05:42 -0800 |
commit | 86ec81242987d876ef0760b6d9201c79de9d1bf4 (patch) | |
tree | 7218eb94926339718084cf101ab76907d8912793 /tests | |
parent | 87b5ad0dfc2cca4c35337f85bc0f5b89fe462d6a (diff) |
Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/gtk/glliveshader.c | 3 | ||||
-rw-r--r-- | tests/icles/metadata_editor.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/examples/gtk/glliveshader.c b/tests/examples/gtk/glliveshader.c index 6f820a63a..d8c8d3506 100644 --- a/tests/examples/gtk/glliveshader.c +++ b/tests/examples/gtk/glliveshader.c @@ -233,8 +233,7 @@ _on_text_changed (GtkTextBuffer * text, struct text_view_state *state) GtkTextIter start, end; gtk_text_buffer_get_bounds (text, &start, &end); - if (state->str) - g_free (state->str); + g_free (state->str); state->str = gtk_text_buffer_get_text (text, &start, &end, FALSE); g_object_set (state->state->shader, "update-shader", TRUE, NULL); } diff --git a/tests/icles/metadata_editor.c b/tests/icles/metadata_editor.c index 7266a7d33..7352e7ba8 100644 --- a/tests/icles/metadata_editor.c +++ b/tests/icles/metadata_editor.c @@ -201,8 +201,7 @@ insert_tag_on_tree (const GstTagList * list, const gchar * tag, gtk_tree_store_append (tree_store, &iter, NULL); gtk_tree_store_set (tree_store, &iter, COL_TAG, tag, COL_VALUE, str, -1); - if (str) - g_free (str); + g_free (str); } |