summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2015-01-08 14:35:24 -0800
committerJasper St. Pierre <jstpierre@mecheye.net>2015-01-08 14:35:24 -0800
commitd0673a1c41a3d0021940d13cc6508c719220c4e7 (patch)
treec6c89fdb0b4dafe00e951089c9e6ebc2bfaaf534
parent7fdf9210181c9a54ac0efeb2373b80555842b9f1 (diff)
downloadgnome-desktop-d0673a1c41a3d0021940d13cc6508c719220c4e7.tar.gz
gnome-rr-config: Remove checks around g_strdup
g_strdup already handles NULLs just fine.
-rw-r--r--libgnome-desktop/gnome-rr-config.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libgnome-desktop/gnome-rr-config.c b/libgnome-desktop/gnome-rr-config.c
index e6de41ff..f739ecd8 100644
--- a/libgnome-desktop/gnome-rr-config.c
+++ b/libgnome-desktop/gnome-rr-config.c
@@ -423,16 +423,12 @@ make_outputs (GnomeRRConfig *config)
GnomeRROutputInfo *old = config->priv->outputs[i];
GnomeRROutputInfo *new = g_object_new (GNOME_TYPE_RR_OUTPUT_INFO, NULL);
*(new->priv) = *(old->priv);
- if (old->priv->name)
- new->priv->name = g_strdup (old->priv->name);
- if (old->priv->display_name)
- new->priv->display_name = g_strdup (old->priv->display_name);
- if (old->priv->vendor)
- new->priv->vendor = g_strdup (old->priv->vendor);
- if (old->priv->product)
- new->priv->product = g_strdup (old->priv->product);
- if (old->priv->serial)
- new->priv->serial = g_strdup (old->priv->serial);
+
+ new->priv->name = g_strdup (old->priv->name);
+ new->priv->display_name = g_strdup (old->priv->display_name);
+ new->priv->vendor = g_strdup (old->priv->vendor);
+ new->priv->product = g_strdup (old->priv->product);
+ new->priv->serial = g_strdup (old->priv->serial);
if (old->priv->on && !first_on)
first_on = old;