mirror of
https://github.com/systemd/systemd.git
synced 2026-06-30 19:57:29 +00:00
sysupdate: Fix an early return path return value
If the FD has already been opened, return 1 as if opening was successful, rather than returning 0 as if it gave `ENOENT`. This fixes doing multiple installdb operations on a single `Context`. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -57,7 +57,7 @@ static int context_installdb_acquire_fd(Context *c, bool make) {
|
||||
assert(c);
|
||||
|
||||
if (c->installdb_fd >= 0)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
_cleanup_free_ char *j = NULL;
|
||||
const char *p;
|
||||
|
||||
Reference in New Issue
Block a user