[gvfs] Fix misleading if-statement
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Fix misleading if-statement
- Date: Fri, 29 Apr 2016 07:39:29 +0000 (UTC)
commit 13cb380f76a73f25bc997749d4487eab68efacda
Author: Ondrej Holy <oholy redhat com>
Date: Thu Apr 28 16:12:53 2016 +0200
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...
daemon/gvfskeyring.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfskeyring.c b/daemon/gvfskeyring.c
index 6aa3e66..556672b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]