]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-gatewayd: add missing assertions
authorMike Yuan <me@yhndnzj.com>
Wed, 17 Apr 2024 13:50:05 +0000 (21:50 +0800)
committerMike Yuan <me@yhndnzj.com>
Wed, 17 Apr 2024 13:50:05 +0000 (21:50 +0800)
src/journal-remote/journal-gatewayd.c

index 08ea94f6d4065a1a16a1178f3d94283787213509..036283fcd2d9e5c86678d944f4542008a0feeeda 100644 (file)
@@ -348,6 +348,9 @@ static int request_parse_range_entries(
         const char *colon;
         int r;
 
+        assert(m);
+        assert(entries_request);
+
         colon = strchr(entries_request, ':');
         if (!colon)
                 m->cursor = strdup(entries_request);
@@ -376,6 +379,9 @@ static int request_parse_range_time(
         const char *colon;
         int r;
 
+        assert(m);
+        assert(time_request);
+
         colon = strchr(time_request, ':');
         if (!colon)
                 return -EINVAL;