]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/webutil: reorder .c to match .h, mark one more function as _pure_
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 16 Apr 2026 15:31:59 +0000 (17:31 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 16 Apr 2026 19:12:20 +0000 (21:12 +0200)
src/shared/web-util.c
src/shared/web-util.h

index 628f0805bd3f830ad5fc572f747c20d7498e7b48..23f3004700b462bd9a95a7c7074ad5ea9d192c08 100644 (file)
@@ -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;
+}
index 68f868ab0a24e62c27d7e877e1e0e4d63c808925..8a2f5c537bcef417e6b85a3440076ffb099d3e08 100644 (file)
@@ -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_;