for (j = 0; keys[j]; j++) {
val = g_key_file_get_string(kf, sections[i], keys[j], NULL);
if (!strcmp(keys[j], "capturefile")) {
- sdi = sr_dev_inst_new();
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->driver = &session_driver;
sdi->status = SR_ST_ACTIVE;
if (!session_driver_initialized) {
g_variant_new_uint64(total_channels), sdi, NULL);
for (p = 0; p < total_channels; p++) {
snprintf(channelname, SR_MAX_CHANNELNAME_LEN, "%" PRIu64, p);
- if (!(ch = sr_channel_new(p, SR_CHANNEL_LOGIC, TRUE,
- channelname)))
- return SR_ERR;
+ ch = sr_channel_new(p, SR_CHANNEL_LOGIC, TRUE,
+ channelname);
sdi->channels = g_slist_append(sdi->channels, ch);
}
} else if (!strncmp(keys[j], "probe", 5)) {