projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1e2494
)
lib/repo: do no return an arbitrary mode on failure
author
Luca BRUNO
<luca.bruno@coreos.com>
Tue, 7 Dec 2021 16:16:39 +0000
(16:16 +0000)
committer
Luca BRUNO
<luca.bruno@coreos.com>
Tue, 7 Dec 2021 16:23:02 +0000
(16:23 +0000)
This turns the existing check into an assert. Otherwise, the previous
code may return an arbitrary repo mode (bare) on failure.
src/libostree/ostree-repo.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-repo.c
b/src/libostree/ostree-repo.c
index 85700b03abd609c03a4d70d1690b9d7e1e04a87e..f07d223508f5c326340fffbe809a8334510f0cb8 100644
(file)
--- a/
src/libostree/ostree-repo.c
+++ b/
src/libostree/ostree-repo.c
@@
-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;
}