Fix: core fixes (#42744)

Some simple code fixes
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-06-25 14:39:53 +02:00
committed by GitHub
3 changed files with 5 additions and 5 deletions

View File

@@ -2748,7 +2748,8 @@ int exec_shared_runtime_deserialize_compat(Unit *u, const char *key, const char
int exec_shared_runtime_deserialize_one(Manager *m, const char *value, FDSet *fds) {
_cleanup_free_ char *tmp_dir = NULL, *var_tmp_dir = NULL;
char *id = NULL;
int r, userns_fdpair[] = {-1, -1}, netns_fdpair[] = {-1, -1}, ipcns_fdpair[] = {-1, -1};
_cleanup_close_pair_ int userns_fdpair[] = EBADF_PAIR, netns_fdpair[] = EBADF_PAIR, ipcns_fdpair[] = EBADF_PAIR;
int r;
const char *p, *v = ASSERT_PTR(value);
size_t n;

View File

@@ -1301,7 +1301,7 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
if (r < 0)
return r;
memzero(o->hash_table.items, s);
memzero(o->hash_table.items, s * sizeof(HashItem));
f->header->data_hash_table_offset = htole64(p + offsetof(Object, hash_table.items));
f->header->data_hash_table_size = htole64(s * sizeof(HashItem));

View File

@@ -83,10 +83,9 @@ int verb_clean_or_freeze(int argc, char *argv[], uintptr_t _data, void *userdata
r = sd_bus_call(bus, m, 0, &error, NULL);
if (r < 0) {
log_error_errno(r, "Failed to %s unit %s: %s", argv[0], *name, bus_error_message(&error, r));
if (ret == EXIT_SUCCESS) {
if (ret == EXIT_SUCCESS)
ret = r;
continue;
}
continue;
}
if (w) {