g_strdup returns NULL if the input was NULL

Tue, 04 Oct 2016 19:15:52 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 04 Oct 2016 19:15:52 -0500
changeset 38290
2d8479ba7df8
parent 38289
c839a25b8f2e
child 38291
dc6b4a65073f

g_strdup returns NULL if the input was NULL

libpurple/smiley.c file | annotate | diff | comparison | revisions
--- a/libpurple/smiley.c	Tue Oct 04 19:13:03 2016 -0500
+++ b/libpurple/smiley.c	Tue Oct 04 19:15:52 2016 -0500
@@ -47,7 +47,7 @@
 
 	g_free(priv->shortcut);
 
-	priv->shortcut = (shortcut) ? g_strdup(shortcut) : NULL;
+	priv->shortcut = g_strdup(shortcut);
 
 	g_object_notify(G_OBJECT(smiley), "shortcut");
 }

mercurial