Fix test failure
The GError object has to initialized to NULL before being passed to g_file_set_contents or it will throw the following critical warning GLib-CRITICAL **: g_file_set_contents: assertion 'error == NULL || *error == NULL' failed and return FALSE, which leads to failed assertion and subsequently to the test failing
This commit is contained in:
parent
0f4a435057
commit
c3e2b08dc9
|
@ -198,7 +198,7 @@ void srtest_check_samplerate(struct sr_context *sr_ctx, const char *drivername,
|
|||
void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len)
|
||||
{
|
||||
FILE *f;
|
||||
GError *error;
|
||||
GError *error = NULL;
|
||||
gboolean ret;
|
||||
|
||||
f = g_fopen(filename, "wb");
|
||||
|
|
Loading…
Reference in New Issue