diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 5763a262ec..86948ee261 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -1558,8 +1558,10 @@ gboolean ostree_repo_is_writable (OstreeRepo *self, GError **error) { - g_return_val_if_fail (self->inited, FALSE); + g_assert (self != NULL); + g_assert (self->inited); + g_assert (self->writable == (self->writable_error == NULL)); if (error != NULL && self->writable_error != NULL) *error = g_error_copy (self->writable_error); @@ -1595,7 +1597,8 @@ _ostree_repo_update_mtime (OstreeRepo *self, GKeyFile * ostree_repo_get_config (OstreeRepo *self) { - g_return_val_if_fail (self->inited, NULL); + g_assert (self != NULL); + g_assert (self->inited); return self->config; } @@ -1613,7 +1616,8 @@ ostree_repo_copy_config (OstreeRepo *self) char *data; gsize len; - g_return_val_if_fail (self->inited, NULL); + g_assert (self != NULL); + g_assert (self->inited); copy = g_key_file_new (); data = g_key_file_to_data (self->config, &len, NULL); @@ -3812,7 +3816,8 @@ ostree_repo_equal (OstreeRepo *a, OstreeRepoMode ostree_repo_get_mode (OstreeRepo *self) { - g_return_val_if_fail (self->inited, FALSE); + g_assert (self != NULL); + g_assert (self->inited); return self->mode; }