[gnome-logs/wip/test: 31/31] Initialize boot_id in gl_mock_journal_get_boots
- From: Rashi Aswani <aswanirashi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/test: 31/31] Initialize boot_id in gl_mock_journal_get_boots
- Date: Fri, 28 Aug 2015 13:47:37 +0000 (UTC)
commit 6a792c8eb6ccded7f75fb35a60de82550dd1f6ac
Author: Rashi Aswani <aswanirashi19 gmail com>
Date: Fri Aug 28 19:14:13 2015 +0530
Initialize boot_id in gl_mock_journal_get_boots
tests/gl-mock-journal.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/tests/gl-mock-journal.c b/tests/gl-mock-journal.c
index 8f49652..b1c91fe 100644
--- a/tests/gl-mock-journal.c
+++ b/tests/gl-mock-journal.c
@@ -76,8 +76,8 @@ gl_mock_journal_get_current_boot_time (GlMockJournal *journal,
static void
gl_mock_journal_get_boots (GlMockJournal *journal)
{
- GlMockJournalBootID *boot_id;
- boot_id->boot_match = (gchar *)g_strdup("_BOOT_ID=e74546deb79c453990b96132ae3eb201");
+ GlMockJournalBootID *boot_id = (GlMockJournalBootID *)g_malloc(sizeof(GlMockJournalBootID));
+ boot_id->boot_match = g_strdup("_BOOT_ID=e74546deb79c453990b96132ae3eb201");
}
GArray *
gl_mock_journal_get_boot_ids (GlMockJournal *journal)
@@ -102,10 +102,9 @@ gl_mock_journal_finalize (GObject *object)
g_clear_pointer (&priv->mandatory_fields, g_strfreev);
for (i = 0; i < priv->boot_ids->len; i++)
{
- GlJournalBootID *boot_id;
-
- boot_id = &g_array_index (priv->boot_ids, GlJournalBootID, i);
+ GlMockJournalBootID *boot_id;
+ boot_id = &g_array_index (priv->boot_ids, GlMockJournalBootID, i);
g_free (boot_id->boot_match);
}
g_array_free (priv->boot_ids, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]