minor fixups for #32212

Fix minor post merge comments
This commit is contained in:
Matteo Croce
2024-09-12 19:17:24 +02:00
committed by Lennart Poettering
parent cf94f513f0
commit 64e03ca8bf
3 changed files with 8 additions and 5 deletions

View File

@@ -65,8 +65,11 @@ static int shadow_update(Hashmap **shadow, const char *property, const char *val
cur_v = hashmap_remove2(*shadow, k, (void**)&cur_k);
r = hashmap_ensure_put(shadow, &path_hash_ops_free_free, k, v);
if (r < 0)
if (r < 0) {
assert(r != -EEXIST);
return r;
}
TAKE_PTR(k);
TAKE_PTR(v);

View File

@@ -704,11 +704,11 @@ int manager_start(Manager *m) {
* Drop the capabilities here, regardless if the load succeeds or not. */
r = drop_capability(CAP_SYS_ADMIN);
if (r < 0)
log_warning_errno(r, "Failed to drop CAP_SYS_ADMIN: %m, ignoring.");
log_warning_errno(r, "Failed to drop CAP_SYS_ADMIN, ignoring: %m.");
r = drop_capability(CAP_BPF);
if (r < 0)
log_warning_errno(r, "Failed to drop CAP_BPF: %m, ignoring.");
log_warning_errno(r, "Failed to drop CAP_BPF, ignoring: %m.");
manager_set_sysctl(m);

View File

@@ -28,12 +28,12 @@
#include "bpf/sysctl_monitor/sysctl-monitor-skel.h"
#include "bpf/sysctl_monitor/sysctl-write-event.h"
static struct sysctl_monitor_bpf *sysctl_monitor_bpf_free(struct sysctl_monitor_bpf *obj) {
static struct sysctl_monitor_bpf* sysctl_monitor_bpf_free(struct sysctl_monitor_bpf *obj) {
sysctl_monitor_bpf__destroy(obj);
return NULL;
}
static struct ring_buffer *rb_free(struct ring_buffer *rb) {
static struct ring_buffer* rb_free(struct ring_buffer *rb) {
sym_ring_buffer__free(rb);
return NULL;
}