summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-01-09 21:40:08 -0500
committerSolomon Peachy <pizza@shaftnet.org>2018-01-09 21:40:08 -0500
commit7db590c56f4b8b5402e9ff7db02aa9e9d3a6a87b (patch)
tree6261e4c4c3bf2f98aebfa55b25f27cd7f8892c00
parent1767a89f21e797ce027648d4eb100005026940d9 (diff)
downloadselphy_print-7db590c56f4b8b5402e9ff7db02aa9e9d3a6a87b.tar.gz
selphy_print-7db590c56f4b8b5402e9ff7db02aa9e9d3a6a87b.tar.bz2
selphy_print-7db590c56f4b8b5402e9ff7db02aa9e9d3a6a87b.zip
s2145: Silence a build warning.
(a call to write wasn't checking the return value)
-rw-r--r--backend_shinkos2145.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/backend_shinkos2145.c b/backend_shinkos2145.c
index ee7f6b6..719a521 100644
--- a/backend_shinkos2145.c
+++ b/backend_shinkos2145.c
@@ -1216,8 +1216,14 @@ static int get_tonecurve(struct shinkos2145_ctx *ctx, int type, char *fname)
/* Byteswap appropriately */
curves[i] = cpu_to_be16(le16_to_cpu(curves[i]));
}
- write(tc_fd, curves, UPDATE_SIZE * sizeof(uint16_t));
+ ret = write(tc_fd, curves, UPDATE_SIZE * sizeof(uint16_t));
+ if (ret < 0)
+ ERROR("Can't write curve file\n");
+ else
+ ret = 0;
+
close(tc_fd);
+
}
done:
@@ -1746,7 +1752,7 @@ static int shinkos2145_query_serno(struct libusb_device_handle *dev, uint8_t end
struct dyesub_backend shinkos2145_backend = {
.name = "Shinko/Sinfonia CHC-S2145",
- .version = "0.48",
+ .version = "0.49",
.uri_prefix = "shinkos2145",
.cmdline_usage = shinkos2145_cmdline,
.cmdline_arg = shinkos2145_cmdline_arg,