[tracker-miners] tests: Add assert around g_file_set_contents() call
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners] tests: Add assert around g_file_set_contents() call
- Date: Fri, 29 Sep 2017 12:58:34 +0000 (UTC)
commit 3921eb680e2b655d2c77965795c6b6c319c24888
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 25 17:46:42 2017 +0200
tests: Add assert around g_file_set_contents() call
Spotted through coverity (CID: #162189)
tests/libtracker-common/tracker-file-utils-test.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-common/tracker-file-utils-test.c
b/tests/libtracker-common/tracker-file-utils-test.c
index bff696a..a7722ba 100644
--- a/tests/libtracker-common/tracker-file-utils-test.c
+++ b/tests/libtracker-common/tracker-file-utils-test.c
@@ -41,7 +41,7 @@ ensure_file_exists (const gchar *filename)
g_autoptr(GError) error = NULL;
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
- g_file_set_contents (filename, "Just some stuff", -1, &error);
+ g_assert (g_file_set_contents (filename, "Just some stuff", -1, &error) == TRUE);
g_assert_no_error (error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]