summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-08-02 09:31:06 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-08-02 09:32:14 -0400
commitdd171500c4a497d87af646068e40910a0640a2e6 (patch)
treece0608ae6b7a558f8ae7c5fa56f5bdb7f66aeac8
parent8ce63e26b4e687749c5d91b7549310404f7b56c1 (diff)
downloadselphy_print-dd171500c4a497d87af646068e40910a0640a2e6.tar.gz
selphy_print-dd171500c4a497d87af646068e40910a0640a2e6.tar.bz2
selphy_print-dd171500c4a497d87af646068e40910a0640a2e6.zip
s6145: Minor tweak to the new corrdata management code.
-rw-r--r--backend_shinkos6145.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend_shinkos6145.c b/backend_shinkos6145.c
index 34c2629..cb5e98f 100644
--- a/backend_shinkos6145.c
+++ b/backend_shinkos6145.c
@@ -906,6 +906,7 @@ static int shinkos6145_get_imagecorr(struct shinkos6145_ctx *ctx)
ctx->corrdatalen = le16_to_cpu(resp.total_size);
INFO("Fetching %u bytes of image correction data\n", ctx->corrdatalen);
+ /* We need a little extra to pass arguments to the library */
ctx->corrdata = malloc(ctx->corrdatalen + S6145_CORRDATA_EXTRA_LEN);
if (!ctx->corrdata) {
ERROR("Memory allocation failure\n");
@@ -931,7 +932,6 @@ static int shinkos6145_get_imagecorr(struct shinkos6145_ctx *ctx)
DEBUG("correction block transferred (%u/%u total)\n", total, ctx->corrdatalen);
}
- ctx->corrdatalen += S6145_CORRDATA_EXTRA_LEN;
done:
return ret;