X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/08b5c9a264d05d28d756f2203a251e42d9add06a..806c9d94341c912a45e563d87ad36d63966a4308:/logging.c diff --git a/logging.c b/logging.c index 7c9b1287..74654804 100644 --- a/logging.c +++ b/logging.c @@ -43,7 +43,7 @@ static void logwrite(struct LogContext *ctx, void *data, int len) bufchain_add(&ctx->queue, data, len); } else if (ctx->state == L_OPEN) { assert(ctx->lgfp); - if (fwrite(data, 1, len, ctx->lgfp) < len) { + if (fwrite(data, 1, len, ctx->lgfp) < (size_t)len) { logfclose(ctx); ctx->state = L_ERROR; /* Log state is L_ERROR so this won't cause a loop */