summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/uri.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/uri.c b/src/core/uri.c
index 73ad2b227..e9e512ab4 100644
--- a/src/core/uri.c
+++ b/src/core/uri.c
@@ -413,8 +413,8 @@ struct uri * parse_uri ( const char *uri_string ) {
}
/* Split host into host[:port] */
- if ( ( uri->host[ strlen ( uri->host ) - 1 ] != ']' ) &&
- ( tmp = strrchr ( uri->host, ':' ) ) ) {
+ if ( ( tmp = strrchr ( uri->host, ':' ) ) &&
+ ( uri->host[ strlen ( uri->host ) - 1 ] != ']' ) ) {
*(tmp++) = '\0';
uri->port = tmp;
}