summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-14 17:04:55 -0800
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-15 01:43:08 -0800
commitf58841c24e601414bd4b0c36d833e1b9e81b10e6 (patch)
tree53513ac1290de9fb792348601e526420d1fb0fad
parent2b7a1b4bb9bfda2f8ff25f0cf4ec06220e5da67a (diff)
shout2: remove unnecessary NULL checks before g_free()
-rw-r--r--ext/shout2/gstshout2.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c
index 2384ebc9a..e154ba871 100644
--- a/ext/shout2/gstshout2.c
+++ b/ext/shout2/gstshout2.c
@@ -688,52 +688,44 @@ gst_shout2send_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_IP:
- if (shout2send->ip)
- g_free (shout2send->ip);
+ g_free (shout2send->ip);
shout2send->ip = g_strdup (g_value_get_string (value));
break;
case ARG_PORT:
shout2send->port = g_value_get_int (value);
break;
case ARG_PASSWORD:
- if (shout2send->password)
- g_free (shout2send->password);
+ g_free (shout2send->password);
shout2send->password = g_strdup (g_value_get_string (value));
break;
case ARG_USERNAME:
- if (shout2send->username)
- g_free (shout2send->username);
+ g_free (shout2send->username);
shout2send->username = g_strdup (g_value_get_string (value));
break;
case ARG_PUBLIC:
shout2send->ispublic = g_value_get_boolean (value);
break;
case ARG_STREAMNAME: /* Name of the stream */
- if (shout2send->streamname)
- g_free (shout2send->streamname);
+ g_free (shout2send->streamname);
shout2send->streamname = g_strdup (g_value_get_string (value));
break;
case ARG_DESCRIPTION: /* Description of the stream */
- if (shout2send->description)
- g_free (shout2send->description);
+ g_free (shout2send->description);
shout2send->description = g_strdup (g_value_get_string (value));
break;
case ARG_GENRE: /* Genre of the stream */
- if (shout2send->genre)
- g_free (shout2send->genre);
+ g_free (shout2send->genre);
shout2send->genre = g_strdup (g_value_get_string (value));
break;
case ARG_PROTOCOL: /* protocol to connect with */
shout2send->protocol = g_value_get_enum (value);
break;
case ARG_MOUNT: /* mountpoint of stream (icecast only) */
- if (shout2send->mount)
- g_free (shout2send->mount);
+ g_free (shout2send->mount);
shout2send->mount = g_strdup (g_value_get_string (value));
break;
case ARG_URL: /* the stream's homepage URL */
- if (shout2send->url)
- g_free (shout2send->url);
+ g_free (shout2send->url);
shout2send->url = g_strdup (g_value_get_string (value));
break;
default: