# HG changeset patch
# User Mike Becker <universe@uap-core.de>
# Date 1654708497 -7200
# Node ID e56f9c6f6b8f35db9b5233131c35fcffe99fde80
# Parent  7f0f5c03666ab6ce9da9588f49814f2a91a28c06
fix code that is not standard C

diff -r 7f0f5c03666a -r e56f9c6f6b8f src/server/util/uri.c
--- a/src/server/util/uri.c	Wed Jun 08 18:55:59 2022 +0200
+++ b/src/server/util/uri.c	Wed Jun 08 19:14:57 2022 +0200
@@ -464,21 +464,19 @@
     }
 
 done:
-    int canonLen = 0;
 
     if (success) {
         /* the path looks fine; return the canonicalized form */
-        canonLen = (int) (out_ptr - canonPath);
+        unsigned canonLen = (unsigned) (out_ptr - canonPath);
         canonPath[canonLen] = '\0';
+        if (pcanonlen) *pcanonlen = (int) canonLen;
     } else {
         /* error canonicalizing */
         pool_free(pool, canonPath);
         canonPath = NULL;
+        if (pcanonlen) *pcanonlen = 0;
     }
 
-    if (pcanonlen)
-        *pcanonlen = canonLen;
-
     return canonPath;
 }