diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-01-26 10:28:02 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-01-26 10:46:28 +0100 |
commit | 47e19d65d75f8b900fc663430bbe6dcacef6e2a0 (patch) | |
tree | d240af625329df425999e8f3f058b73fa4e8bb87 | |
parent | 2c6563298ade70427775896b1f79e820f4e46348 (diff) | |
download | libgphoto2-47e19d65d75f8b900fc663430bbe6dcacef6e2a0.tar.gz |
check return of READ_STATUS
-rw-r--r-- | camlibs/clicksmart310/clicksmart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/camlibs/clicksmart310/clicksmart.c b/camlibs/clicksmart310/clicksmart.c index f5586f930..7ee867dcb 100644 --- a/camlibs/clicksmart310/clicksmart.c +++ b/camlibs/clicksmart310/clicksmart.c @@ -86,9 +86,9 @@ int clicksmart_init (GPPort *port, CameraPrivateLibrary *priv) CLICKSMART_READ_STATUS (port, &c); gp_port_usb_msg_interface_write(port, 6, 0, 9, NULL, 0); while (c != 1) { - if (GP_OK > CLICKSMART_READ_STATUS (port, &c)) { - return GP_ERROR_IO; - } + int r; + if ((r = CLICKSMART_READ_STATUS (port, &c)) < GP_OK) + return r; } buffer = malloc(0x200); if (!buffer) { |