]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
drivers: Use NUM_CHANNELS in favor of hardcoded values.
[libsigrok.git] / src / hardware / hantek-dso / api.c
index cdc4360e9a40b440099ae86e7ada37b46b63edcf..bc10f39e5e1668ccd76ff37ff8363e199e13cc9f 100644 (file)
@@ -613,7 +613,7 @@ static void send_chunk(struct sr_dev_inst *sdi, unsigned char *buf,
        /* TODO: Check malloc return value. */
        analog.data = g_try_malloc(num_samples * sizeof(float));
 
-       for (int ch = 0; ch < 2; ch++) {
+       for (int ch = 0; ch < NUM_CHANNELS; ch++) {
                if (!devc->ch_enabled[ch])
                        continue;