Welcome to little lamb

Code » qmdoc » commit 0eb287e

Minor refactoring

author Olivier Brunel
2022-12-27 13:01:04 UTC
committer Olivier Brunel
2022-12-27 13:01:04 UTC
parent 36d9e22f8ec5f6c3d7d253ac5b87298503893d6e

Minor refactoring

main.c +1 -2

diff --git a/main.c b/main.c
index 0a28f9f..0262289 100644
--- a/main.c
+++ b/main.c
@@ -666,8 +666,7 @@ convert_page(struct ctx *ctx)
     if (!stralloc_readyplus(&ctx->sa, size))
         return ERR_MEM;
 
-    allread(ctx->pages[ctx->cur_page].fd, ctx->sa.s + salen, size);
-    if (errno) {
+    if (allread(ctx->pages[ctx->cur_page].fd, ctx->sa.s + salen, size) != size) {
         int e = errno;
         ctx->sa.len = salen;
         errs(PROG);