Wed, 08 Jun 2022 19:14:57 +0200
fix code that is not standard C
src/server/util/uri.c | file | annotate | diff | comparison | revisions |
--- 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; }