From: Zbigniew Jędrzejewski-Szmek Date: Thu, 16 Apr 2026 15:31:59 +0000 (+0200) Subject: shared/webutil: reorder .c to match .h, mark one more function as _pure_ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fca491e03642ada516fe8386397aa166c92c284e;p=thirdparty%2Fsystemd.git shared/webutil: reorder .c to match .h, mark one more function as _pure_ --- diff --git a/src/shared/web-util.c b/src/shared/web-util.c index 628f0805bd3..23f3004700b 100644 --- a/src/shared/web-util.c +++ b/src/shared/web-util.c @@ -5,19 +5,6 @@ #include "utf8.h" #include "web-util.h" -bool http_etag_is_valid(const char *etag) { - if (isempty(etag)) - return false; - - if (!endswith(etag, "\"")) - return false; - - if (!STARTSWITH_SET(etag, "\"", "W/\"")) - return false; - - return true; -} - bool http_url_is_valid(const char *url) { const char *p; @@ -62,3 +49,16 @@ bool documentation_url_is_valid(const char *url) { return ascii_is_valid(p); } + +bool http_etag_is_valid(const char *etag) { + if (isempty(etag)) + return false; + + if (!endswith(etag, "\"")) + return false; + + if (!STARTSWITH_SET(etag, "\"", "W/\"")) + return false; + + return true; +} diff --git a/src/shared/web-util.h b/src/shared/web-util.h index 68f868ab0a2..8a2f5c537bc 100644 --- a/src/shared/web-util.h +++ b/src/shared/web-util.h @@ -5,7 +5,5 @@ bool http_url_is_valid(const char *url) _pure_; bool file_url_is_valid(const char *url) _pure_; - bool documentation_url_is_valid(const char *url) _pure_; - -bool http_etag_is_valid(const char *etag); +bool http_etag_is_valid(const char *etag) _pure_;