- * @return A newly allocated trigger stage (which has also been added to the
- * list of stages of the specified trigger).
+ * @retval NULL An invalid (NULL) trigger was passed into the function.
+ * @retval other A newly allocated trigger stage (which has also been added
+ * to the list of stages of the specified trigger).
stage = g_malloc0(sizeof(struct sr_trigger_stage));
stage->stage = g_slist_length(trig->stages);
trig->stages = g_slist_append(trig->stages, stage);
stage = g_malloc0(sizeof(struct sr_trigger_stage));
stage->stage = g_slist_length(trig->stages);
trig->stages = g_slist_append(trig->stages, stage);
if (ch->type == SR_CHANNEL_LOGIC) {
if (trigger_match != SR_TRIGGER_ZERO &&
trigger_match != SR_TRIGGER_ONE &&
if (ch->type == SR_CHANNEL_LOGIC) {
if (trigger_match != SR_TRIGGER_ZERO &&
trigger_match != SR_TRIGGER_ONE &&
trigger_match != SR_TRIGGER_OVER &&
trigger_match != SR_TRIGGER_UNDER) {
sr_err("Invalid trigger match for an analog channel.");
return SR_ERR_ARG;
}
trigger_match != SR_TRIGGER_OVER &&
trigger_match != SR_TRIGGER_UNDER) {
sr_err("Invalid trigger match for an analog channel.");
return SR_ERR_ARG;
}