Drop an initial assignment to a variable which never takes effect.
Add braces around the body of a more complex if block. Separate routines
from each other by exactly one empty line.
GString *response;
gint64 laststart;
unsigned int elapsed_ms;
- unsigned int offset = 0;
+ unsigned int offset;
int space;
- if (command)
+ if (command) {
if (sr_scpi_send(scpi, command) != SR_OK)
return SR_ERR;
+ }
if (sr_scpi_read_begin(scpi) != SR_OK)
return SR_ERR;
return ret;
}
+
/**
* Send a SCPI command, read the reply, parse it as binary data with a
* "definite length block" header and store the as an result in scpi_response.
return ret;
}
-
/**
* Send the *IDN? SCPI command, receive the reply, parse it and store the
* reply as a sr_scpi_hw_info structure in the supplied scpi_response pointer.