This turns an existing check into an assert. The previously returned
NULL may result in confusing callers, as none of them is checking for
that.
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;
}
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);