[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [virt-viewer 2/2] Remove redundant check, g_strdup(NULL) is allowed



This also makes the code consistent with its surroundings.
---
 src/virt-viewer-app.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index fac87f6..0519006 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1893,7 +1893,7 @@ virt_viewer_app_set_connect_info(VirtViewerApp *self,
     priv->host = g_strdup(host);
     priv->ghost = g_strdup(ghost);
     priv->gport = g_strdup(gport);
-    priv->gtlsport = gtlsport ? g_strdup(gtlsport) : NULL;
+    priv->gtlsport = g_strdup(gtlsport);
     priv->transport = g_strdup(transport);
     priv->unixsock = g_strdup(unixsock);
     priv->user = g_strdup(user);
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]