From: Bert Vermeulen Date: Tue, 12 Jun 2012 22:48:43 +0000 (+0200) Subject: cli: output API says to check data_out, not length_out X-Git-Tag: sigrok-cli-0.4.0~106 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d3f829a1c4bce7d3947df93d5367602a0eb7e01f;p=sigrok-cli.git cli: output API says to check data_out, not length_out --- diff --git a/sigrok-cli.c b/sigrok-cli.c index a8e263d..a67b6a3 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -473,7 +473,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) } if (o->format->event) { o->format->event(o, SR_DF_END, &output_buf, &output_len); - if (output_len) { + if (output_buf) { if (outfile) fwrite(output_buf, 1, output_len, outfile); g_free(output_buf); @@ -582,7 +582,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) output_len = 0; if (o->format->data && packet->type == o->format->df_type) o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len); - if (output_len) { + if (output_buf) { fwrite(output_buf, 1, output_len, outfile); g_free(output_buf); }