(vfs_path_build_url_params_str): minor refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-05-21 21:48:17 +03:00
parent 9e039f66d1
commit 5a67afc812

View File

@ -1552,12 +1552,9 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep
g_string_append (buffer, element->host); g_string_append (buffer, element->host);
if (element->ipv6) if (element->ipv6)
g_string_append_c (buffer, ']'); g_string_append_c (buffer, ']');
}
if ((element->port) != 0 && (element->host != NULL)) if (element->port != 0)
{ g_string_append_printf (buffer, ":%d", element->port);
g_string_append_c (buffer, ':');
g_string_append_printf (buffer, "%d", element->port);
} }
if (buffer->len != 0) if (buffer->len != 0)