From d3f829a1c4bce7d3947df93d5367602a0eb7e01f Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Wed, 13 Jun 2012 00:48:43 +0200 Subject: [PATCH] cli: output API says to check data_out, not length_out --- sigrok-cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.30.2