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:
Marvin Schmidt 2013-11-26 08:50:52 +01:00 committed by Uwe Hermann
parent 0f4a435057
commit c3e2b08dc9
1 changed files with 1 additions and 1 deletions

View File

@ -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");