urlmon: Simplify a (redundant) expression in parse_canonicalize.

Gerald Pfeifer gerald at pfeifer.com
Sat Apr 25 14:18:18 CDT 2015


In include/shlwapi.h we have

  #define URL_NO_META                  URL_DONT_SIMPLIFY

On the other hand dlls/urlmon/uri.c has the following logic which
hence is redundant:

    reduce_path = !(flags & URL_NO_META) &&
                  !(flags & URL_DONT_SIMPLIFY) &&
                  ptr && check_hierarchical(pptr);

Since this is the only occurrence of URL_NO_META in uri.c whereas
there are six of URL_DONT_SIMPLIFY, this patch remove the check for
URL_NO_META and leaves the one for URL_DONT_SIMPLIFY.  Which also
makes uri.c more consistent.

Gerald

---
 dlls/urlmon/uri.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index e43d372..48b485b 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -6842,8 +6842,7 @@ static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output,
         ptr = uri->canon_uri+uri->scheme_start+uri->scheme_len+1;
         pptr = &ptr;
     }
-    reduce_path = !(flags & URL_NO_META) &&
-                  !(flags & URL_DONT_SIMPLIFY) &&
+    reduce_path = !(flags & URL_DONT_SIMPLIFY) &&
                   ptr && check_hierarchical(pptr);
 
     for(ptr = uri->canon_uri; ptr < uri->canon_uri+uri->canon_len; ++ptr) {
-- 
2.3.5



More information about the wine-patches mailing list