From: Joel Holdsworth Date: Sat, 9 Mar 2013 16:52:04 +0000 (+0000) Subject: Ensure sr_config_get is called even when assert is compiled out X-Git-Tag: pulseview-0.1.0~89 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c0d6d47981e7749319894a82a2400a5f0c0711b8;p=pulseview.git Ensure sr_config_get is called even when assert is compiled out --- diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index 6a69fdca..b2670b6f 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -195,8 +195,10 @@ void SigSession::feed_in_header(const sr_dev_inst *sdi) // Read out the sample rate assert(sdi->driver); - assert(sr_config_get(sdi->driver, SR_CONF_SAMPLERATE, - (const void**)&sample_rate, sdi) == SR_OK); + + const int ret = sr_config_get(sdi->driver, SR_CONF_SAMPLERATE, + (const void**)&sample_rate, sdi); + assert(ret == SR_OK); // Create data containers for the coming data snapshots {