]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-future: drop redundant branch in test reader fiber 42738/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 24 Jun 2026 18:09:36 +0000 (19:09 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 24 Jun 2026 18:09:36 +0000 (19:09 +0100)
Both the error and the success path returned (int) n, so the check was
a no-op. Return the value directly.

CID#1660095

Follow-up for 7bc793e21f2d4bf67bd311545270bc515fe63ad9

src/libsystemd/sd-future/test-fiber-ops.c

index f2c603fda0b875be37c823c039db2cec124091f6..35a99527100bb93991acbec0de9b5790bd64f4ba 100644 (file)
@@ -422,8 +422,6 @@ static int loop_write_zero_blocking_reader_fiber(void *userdata) {
         _cleanup_free_ char *buf = malloc(ctx->total);
         ASSERT_NOT_NULL(buf);
         ssize_t n = loop_read(ctx->pipefd[0], buf, ctx->total, /* do_poll= */ true);
-        if (n < 0)
-                return (int) n;
         return (int) n;
 }