1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00

journald: Add assertions to config_parse_compress

This commit is contained in:
Sam Leonard 2024-02-13 08:44:00 +00:00
parent d0aef638ac
commit 6813be2eba
No known key found for this signature in database
GPG Key ID: 96850F0978CE78F0

View File

@ -2898,9 +2898,13 @@ int config_parse_compress(
void *data,
void *userdata) {
JournalCompressOptions* compress = data;
JournalCompressOptions* compress = ASSERT_PTR(data);
int r;
assert(unit);
assert(filename);
assert(rvalue);
if (isempty(rvalue)) {
compress->enabled = true;
compress->threshold_bytes = UINT64_MAX;