From: Markus Heidelberg Date: Sun, 27 Nov 2022 01:14:07 +0000 (+0100) Subject: input/csv: eliminate unneeded zero fill of analog samples in malloc X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=49c45a5c64a031c4371710cad1e7a63c9d67c318;hp=e7ed37042611345fdcd47dbd6b9e3ec6fc38919a;p=libsigrok.git input/csv: eliminate unneeded zero fill of analog samples in malloc Zero filling the memory for analog sample data was not harmful, but shadowed the issue which got fixed in commit e7ed37042611. Remove it. Which also happens to unify memory preparation again for logic and for analog data. --- diff --git a/src/input/csv.c b/src/input/csv.c index 0750a4eb..66ac41dc 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -1452,7 +1452,7 @@ static int initial_parse(const struct sr_input *in, GString *buf) inc->analog_datafeed_buf_size /= sample_size; inc->analog_datafeed_buf_size /= inc->analog_channels; sample_count = inc->analog_channels * inc->analog_datafeed_buf_size; - inc->analog_datafeed_buffer = g_malloc0(sample_count * sample_size); + inc->analog_datafeed_buffer = g_malloc(sample_count * sample_size); if (!inc->analog_datafeed_buffer) { sr_err("Cannot allocate datafeed send buffer (analog)."); ret = SR_ERR_MALLOC;