journal: use FSS_HEADER_SIGNATURE at one more place
This commit is contained in:
@@ -139,7 +139,7 @@ int action_setup_keys(void) {
|
||||
r, "Failed to set file attributes on a temporary file for '%s', ignoring: %m", path);
|
||||
|
||||
struct FSSHeader h = {
|
||||
.signature = { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' },
|
||||
.signature = FSS_HEADER_SIGNATURE,
|
||||
.machine_id = machine,
|
||||
.boot_id = boot,
|
||||
.header_size = htole64(sizeof(h)),
|
||||
|
||||
@@ -392,7 +392,7 @@ int journal_file_fss_load(JournalFile *f) {
|
||||
if (header == MAP_FAILED)
|
||||
return -errno;
|
||||
|
||||
if (memcmp(header->signature, FSS_HEADER_SIGNATURE, 8) != 0)
|
||||
if (memcmp(header->signature, (const uint8_t[]) FSS_HEADER_SIGNATURE, 8) != 0)
|
||||
return -EBADMSG;
|
||||
|
||||
if (header->incompatible_flags != 0)
|
||||
|
||||
@@ -261,7 +261,7 @@ assert_cc(sizeof(struct Header) == sizeof(struct Header__packed));
|
||||
assert_cc(sizeof(struct Header) == 272);
|
||||
|
||||
#define FSS_HEADER_SIGNATURE \
|
||||
((const char[]) { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' })
|
||||
{ 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' }
|
||||
|
||||
struct FSSHeader {
|
||||
uint8_t signature[8]; /* "KSHHRHLP" */
|
||||
|
||||
Reference in New Issue
Block a user