X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fpipistrello-ols%2Fprotocol.c;fp=src%2Fhardware%2Fpipistrello-ols%2Fprotocol.c;h=272c8a8c3baa6f34206a9552cb12b3146de00f58;hb=c368e6f3d248a73d69cd0c2c4a7c88a92def55e3;hp=7eddec0dac456adf43c589dc538403389203731e;hpb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;p=libsigrok.git diff --git a/src/hardware/pipistrello-ols/protocol.c b/src/hardware/pipistrello-ols/protocol.c index 7eddec0d..272c8a8c 100644 --- a/src/hardware/pipistrello-ols/protocol.c +++ b/src/hardware/pipistrello-ols/protocol.c @@ -289,9 +289,8 @@ SR_PRIV struct sr_dev_inst *p_ols_get_metadata(uint8_t *buf, int bytes_read, str 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; @@ -326,9 +325,8 @@ SR_PRIV struct sr_dev_inst *p_ols_get_metadata(uint8_t *buf, int bytes_read, str 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;