lib/repo: do no return an arbitrary mode on failure
This turns the existing check into an assert. Otherwise, the previous code may return an arbitrary repo mode (bare) on failure.
This commit is contained in:
parent
f1e24945fa
commit
4a0ebe507f
|
|
@ -3816,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue