From: Uwe Hermann Date: Sun, 2 Feb 2014 23:24:13 +0000 (+0100) Subject: scpi_visa.c: Minor cosmetics. X-Git-Tag: libsigrok-0.3.0~166 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7ad4e2b80b47aab7be54f1efd084b4df7eb1d6b0;p=libsigrok.git scpi_visa.c: Minor cosmetics. --- diff --git a/hardware/common/scpi_visa.c b/hardware/common/scpi_visa.c index 07d4b9a0..0bf6d2a0 100644 --- a/hardware/common/scpi_visa.c +++ b/hardware/common/scpi_visa.c @@ -41,7 +41,7 @@ static int scpi_visa_dev_inst_new(void *priv, const char *resource, if (!params || !params[1]) { sr_err("Invalid parameters."); - return SR_ERR; + return SR_ERR_BUG; } vscpi->resource = g_strdup(params[1]); @@ -58,8 +58,7 @@ static int scpi_visa_open(void *priv) return SR_ERR; } - if (viOpen(vscpi->rmgr, vscpi->resource, VI_NO_LOCK, 0, &vscpi->vi) != VI_SUCCESS) - { + if (viOpen(vscpi->rmgr, vscpi->resource, VI_NO_LOCK, 0, &vscpi->vi) != VI_SUCCESS) { sr_err("Cannot open resource."); return SR_ERR; } @@ -80,7 +79,7 @@ static int scpi_visa_source_remove(void *priv) { (void) priv; - return sr_source_remove(-1);; + return sr_source_remove(-1); } static int scpi_visa_send(void *priv, const char *command) @@ -118,9 +117,8 @@ static int scpi_visa_read_data(void *priv, char *buf, int maxlen) struct scpi_visa *vscpi = priv; ViUInt32 count; - if (viRead(vscpi->vi, (ViBuf) buf, maxlen, &count) != VI_SUCCESS) - { - sr_err("Read failed"); + if (viRead(vscpi->vi, (ViBuf) buf, maxlen, &count) != VI_SUCCESS) { + sr_err("Read failed."); return SR_ERR; } @@ -133,7 +131,7 @@ static int scpi_visa_read_complete(void *priv) ViUInt16 status; if (viReadSTB(vscpi->vi, &status) != VI_SUCCESS) { - sr_err("Failed to read status"); + sr_err("Failed to read status."); return SR_ERR; }