]> sigrok.org Git - pulseview.git/commitdiff
Ensure sr_config_get is called even when assert is compiled out
authorJoel Holdsworth <redacted>
Sat, 9 Mar 2013 16:52:04 +0000 (16:52 +0000)
committerJoel Holdsworth <redacted>
Mon, 11 Mar 2013 20:41:35 +0000 (20:41 +0000)
pv/sigsession.cpp

index 6a69fdca2b99970aa0a86234a92fc0336dcb33c0..b2670b6fbfcc908089ae7cc5b52704773ac33db3 100644 (file)
@@ -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
        {