2
0
forked from Ivasoft/DSView

Improve trigger commit strategy @ LA mode

This commit is contained in:
DreamSourceLab
2015-12-10 21:46:08 +08:00
parent b9e8c02c09
commit 6c7101c2cc
9 changed files with 148 additions and 252 deletions

View File

@@ -45,9 +45,11 @@ SR_API int ds_trigger_init(void)
{
int i, j;
if (!(trigger = g_try_malloc0(sizeof(struct ds_trigger)))) {
sr_err("Trigger malloc failed.");
return SR_ERR_MALLOC;
if (!trigger) {
if (!(trigger = g_try_malloc0(sizeof(struct ds_trigger)))) {
sr_err("Trigger malloc failed.");
return SR_ERR_MALLOC;
}
}
trigger->trigger_en = 0;