]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/cem-dt-885x/api.c
Eliminate sr_dev_inst_new().
[libsigrok.git] / src / hardware / cem-dt-885x / api.c
index 8d5425424cffb760db00354ba1549f47a030a806..c8ca2b8f7a648b9003aa1eb9aee05052a6961ae2 100644 (file)
@@ -109,7 +109,7 @@ static GSList *scan(GSList *options)
        while (g_get_monotonic_time() - start < MAX_SCAN_TIME) {
                if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) {
                        /* Found one. */
-                       sdi = sr_dev_inst_new();
+                       sdi = g_malloc0(sizeof(struct sr_dev_inst));
                        sdi->status = SR_ST_INACTIVE;
                        sdi->vendor = g_strdup("CEM");
                        sdi->model = g_strdup("DT-885x");