]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: add stdout_stream_scan() comment (#4102)
authorVito Caputo <vcaputo@gnugeneration.com>
Wed, 28 Sep 2016 05:35:48 +0000 (22:35 -0700)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 28 Sep 2016 05:35:48 +0000 (07:35 +0200)
When s->length is zero this function doesn't do anything, note that in a
comment.

src/journal/journald-stream.c

index 4ad16ee41ca61f27bf3cb8cccb73e34462775128..bc092f3c126fbac55a9f80c09a9c25e733c66d8e 100644 (file)
@@ -393,6 +393,9 @@ static int stdout_stream_scan(StdoutStream *s, bool force_flush) {
 
         p = s->buffer;
         remaining = s->length;
+
+        /* XXX: This function does nothing if (s->length == 0) */
+
         for (;;) {
                 char *end;
                 size_t skip;