if (!params || !params[1]) {
sr_err("Invalid parameters.");
- return SR_ERR;
+ return SR_ERR_BUG;
}
vscpi->resource = g_strdup(params[1]);
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;
}
{
(void) priv;
- return sr_source_remove(-1);;
+ return sr_source_remove(-1);
}
static int scpi_visa_send(void *priv, const char *command)
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;
}
ViUInt16 status;
if (viReadSTB(vscpi->vi, &status) != VI_SUCCESS) {
- sr_err("Failed to read status");
+ sr_err("Failed to read status.");
return SR_ERR;
}