]> mj.ucw.cz Git - libucw.git/blobdiff - lib/url.c
obj_add_attr_ref() with an on-stack buffer is not advisable, better
[libucw.git] / lib / url.c
index cb577cb1625f7ad07e4adcf19fd32a406034bd08..8475a85f378498835509117b51c5b35362f208eb 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -368,8 +368,7 @@ url_normalize(struct url *u, struct url *b)
   int err;
 
   /* Basic checks */
   int err;
 
   /* Basic checks */
-  if (url_proto_path_flags[u->protoid] && !u->host ||
-      u->host && !*u->host ||
+  if (url_proto_path_flags[u->protoid] && (!u->host || !*u->host) ||
       !u->host && u->user ||
       !u->user && u->pass ||
       !u->rest)
       !u->host && u->user ||
       !u->user && u->pass ||
       !u->rest)