mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
Several Coverity fixes (#37253)
This commit is contained in:
@@ -364,7 +364,7 @@ static const struct {
|
||||
static int device_found_to_string_many(DeviceFound flags, char **ret) {
|
||||
_cleanup_free_ char *s = NULL;
|
||||
|
||||
assert(flags >= 0);
|
||||
assert((flags & ~_DEVICE_FOUND_MASK) == 0);
|
||||
assert(ret);
|
||||
|
||||
FOREACH_ELEMENT(i, device_found_map) {
|
||||
|
||||
@@ -4070,8 +4070,7 @@ int journal_file_open(
|
||||
int r;
|
||||
|
||||
assert(fd >= 0 || fname);
|
||||
assert(file_flags >= 0);
|
||||
assert(file_flags <= _JOURNAL_FILE_FLAGS_MAX);
|
||||
assert((file_flags & ~_JOURNAL_FILE_FLAGS_ALL) == 0);
|
||||
assert(mmap_cache);
|
||||
assert(ret);
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ typedef enum JournalFileFlags {
|
||||
JOURNAL_COMPRESS = 1 << 0,
|
||||
JOURNAL_SEAL = 1 << 1,
|
||||
JOURNAL_STRICT_ORDER = 1 << 2,
|
||||
_JOURNAL_FILE_FLAGS_MAX = JOURNAL_COMPRESS|JOURNAL_SEAL|JOURNAL_STRICT_ORDER,
|
||||
_JOURNAL_FILE_FLAGS_ALL = JOURNAL_COMPRESS|JOURNAL_SEAL|JOURNAL_STRICT_ORDER,
|
||||
} JournalFileFlags;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -86,6 +86,7 @@ typedef enum TableErsatz {
|
||||
TABLE_ERSATZ_UNSET,
|
||||
TABLE_ERSATZ_NA,
|
||||
_TABLE_ERSATZ_MAX,
|
||||
_TABLE_ERSATZ_INVALID = -EINVAL,
|
||||
} TableErsatz;
|
||||
|
||||
typedef struct Table Table;
|
||||
|
||||
Reference in New Issue
Block a user