]> sigrok.org Git - libsigrok.git/blobdiff - hardware/rigol-ds1xx2/protocol.c
rigol-ds1xx2: Whitespace, minor fix.
[libsigrok.git] / hardware / rigol-ds1xx2 / protocol.c
index fcac2cf59c59efcc642c9111cebe52e7d956cd8a..d95716d7a59e3abef63dc487e7f40501adeac3b9 100644 (file)
@@ -155,7 +155,7 @@ static int get_cfg_float(const struct sr_dev_inst *sdi, char *cmd, float *f)
        if (get_cfg(sdi, cmd, buf) != SR_OK)
                return SR_ERR;
        *f = strtof(buf, &e);
-       if (e == buf || (fpclassify(*f) & (FP_ZERO|FP_NORMAL)) == 0) {
+       if (e == buf || (fpclassify(*f) & (FP_ZERO | FP_NORMAL)) == 0) {
                sr_dbg("failed to parse response to '%s': '%s'", cmd, buf);
                return SR_ERR;
        }
@@ -167,7 +167,7 @@ static int get_cfg_string(const struct sr_dev_inst *sdi, char *cmd, char **buf)
 {
 
        if (!(*buf = g_try_malloc0(256)))
-               return SR_ERR;
+               return SR_ERR_MALLOC;
 
        if (get_cfg(sdi, cmd, *buf) != SR_OK)
                return SR_ERR;