]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/kecheng-kc-330b/api.c
Eliminate sr_dev_inst_new().
[libsigrok.git] / src / hardware / kecheng-kc-330b / api.c
index 721ceda12937045c100794fce79147d88d118210..1e5480ac0581c35b3f47b33f54ccadb85f944717 100644 (file)
@@ -129,7 +129,7 @@ static GSList *scan(GSList *options)
                for (l = usb_devices; l; l = l->next) {
                        if (scan_kecheng(l->data, &model) != SR_OK)
                                continue;
-                       sdi = sr_dev_inst_new();
+                       sdi = g_malloc0(sizeof(struct sr_dev_inst));
                        sdi->status = SR_ST_INACTIVE;
                        sdi->vendor = g_strdup(VENDOR);
                        sdi->model = model; /* Already g_strndup()'d. */