guchar tmp_c;
int index, i;
- sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, NULL, NULL);
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
+ sdi->status = SR_ST_INACTIVE;
sdi->driver = di;
sdi->priv = devc;
case 0x00:
/* Number of usable channels */
for (ui = 0; ui < tmp_int; ui++) {
- if (!(ch = sr_channel_new(ui, SR_CHANNEL_LOGIC, TRUE,
- p_ols_channel_names[ui])))
- return 0;
+ ch = sr_channel_new(ui, SR_CHANNEL_LOGIC, TRUE,
+ p_ols_channel_names[ui]);
sdi->channels = g_slist_append(sdi->channels, ch);
}
break;
case 0x00:
/* Number of usable channels */
for (ui = 0; ui < tmp_c; ui++) {
- if (!(ch = sr_channel_new(ui, SR_CHANNEL_LOGIC, TRUE,
- p_ols_channel_names[ui])))
- return 0;
+ ch = sr_channel_new(ui, SR_CHANNEL_LOGIC, TRUE,
+ p_ols_channel_names[ui]);
sdi->channels = g_slist_append(sdi->channels, ch);
}
break;