X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=ce9b24d5acb168d5b3d4527a7d25be5d288f25f2;hb=53012da658ae94b245240c8a3e115723eede4c7d;hp=18c02061d4bf020a22e334475f52f361fb906b56;hpb=105df67463b84683a35f3474eccc871e5aa4ed0e;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 18c02061..ce9b24d5 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -292,7 +292,7 @@ static int analog_channel_state_get(struct sr_scpi_dev_inst *scpi, if (sr_scpi_get_string(scpi, command, &tmp_str) != SR_OK) return SR_ERR; - if (array_float_get(tmp_str, vdivs, ARRAY_SIZE(vdivs), &j) != SR_OK) { + if (array_float_get(tmp_str, ARRAY_AND_SIZE(vdivs), &j) != SR_OK) { g_free(tmp_str); sr_err("Could not determine array index for vertical div scale."); return SR_ERR; @@ -366,7 +366,7 @@ SR_PRIV int lecroy_xstream_state_get(struct sr_dev_inst *sdi) if (sr_scpi_get_string(sdi->conn, "TIME_DIV?", &tmp_str) != SR_OK) return SR_ERR; - if (array_float_get(tmp_str, timebases, ARRAY_SIZE(timebases), &i) != SR_OK) { + if (array_float_get(tmp_str, ARRAY_AND_SIZE(timebases), &i) != SR_OK) { g_free(tmp_str); sr_err("Could not determine array index for timbase scale."); return SR_ERR;