[gnome-commander] Remove unnecessary NULL check; g_strdup() is NULL-safe
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Remove unnecessary NULL check; g_strdup() is NULL-safe
- Date: Tue, 1 Feb 2011 19:32:32 +0000 (UTC)
commit 39278b5b1abb59ff9e6e39f1374a9fbc2fe9eeb0
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Feb 1 20:18:03 2011 +0100
Remove unnecessary NULL check; g_strdup() is NULL-safe
src/gnome-cmd-con-device.cc | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index 15ccca6..abffa14 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -430,10 +430,7 @@ void gnome_cmd_con_device_set_device_fn (GnomeCmdConDevice *dev, const gchar *de
g_free (dev->priv->device_fn);
- if (!device_fn)
- dev->priv->device_fn = NULL;
- else
- dev->priv->device_fn = g_strdup (device_fn);
+ dev->priv->device_fn = g_strdup (device_fn);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]