summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2016-04-28 16:12:53 +0200
committerOndrej Holy <oholy@redhat.com>2016-04-29 09:38:18 +0200
commit13cb380f76a73f25bc997749d4487eab68efacda (patch)
tree76b4701b1ba0d87c1fafe750fd25ca3c1b7a1800 /daemon
parent76766ad61c8db18add6b2078b41f1c02e89676ed (diff)
downloadgvfs-13cb380f76a73f25bc997749d4487eab68efacda.tar.gz
Fix misleading if-statement
GCC 6 introduced -Wmisleading-warnings. It reveals this misleading if-statement. "@" should not really be added if username is not specified, however I am convinced that this function is never called without username...
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gvfskeyring.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gvfskeyring.c b/daemon/gvfskeyring.c
index 6aa3e665..556672be 100644
--- a/daemon/gvfskeyring.c
+++ b/daemon/gvfskeyring.c
@@ -119,8 +119,10 @@ build_network_label (const gchar *user,
{
s = g_string_new (NULL);
if (user != NULL)
- g_string_append_uri_escaped (s, user, G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO, TRUE);
- g_string_append (s, "@");
+ {
+ g_string_append_uri_escaped (s, user, G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO, TRUE);
+ g_string_append (s, "@");
+ }
g_string_append (s, server);
if (port != 0)
g_string_append_printf (s, ":%d", port);