[PATCH 08/14] Cleanup: remove dead code and return the correct return code
Dirk Hohndel
dirk at hohndel.org
Wed Jan 3 11:35:11 PST 2018
Coverity CID 207700
Signed-off-by: Dirk Hohndel <dirk at hohndel.org>
---
src/uwatec_smart.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/uwatec_smart.c b/src/uwatec_smart.c
index bb67131134a9..d30bee6f3f0f 100644
--- a/src/uwatec_smart.c
+++ b/src/uwatec_smart.c
@@ -213,17 +213,10 @@ error_free:
static dc_status_t
uwatec_smart_device_close (dc_device_t *abstract)
{
- dc_status_t status = DC_STATUS_SUCCESS;
uwatec_smart_device_t *device = (uwatec_smart_device_t*) abstract;
- dc_status_t rc = DC_STATUS_SUCCESS;
-
- // Close the device.
- rc = dc_iostream_close (device->iostream);
- if (status != DC_STATUS_SUCCESS) {
- dc_status_set_error(&status, rc);
- }
- return status;
+ // Close the device and pass up the return code.
+ return dc_iostream_close (device->iostream);
}
--
2.15.1
More information about the devel
mailing list