X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournal-authenticate.c;h=b3e2601c4e18976e9a85dd85a12dfb8c81b77c75;hb=56e6c2abb8f18bba2bb9d96d66ac7e633349ddfb;hp=fd3b82134f313192a9954276a1f2ce3fcf6eeb24;hpb=2df65e7d964295f2763fae3b8bc3ade5d4e0fbe3;p=elogind.git diff --git a/src/journal/journal-authenticate.c b/src/journal/journal-authenticate.c index fd3b82134..b3e2601c4 100644 --- a/src/journal/journal-authenticate.c +++ b/src/journal/journal-authenticate.c @@ -229,7 +229,7 @@ int journal_file_maybe_append_tag(JournalFile *f, uint64_t realtime) { return 0; } -int journal_file_hmac_put_object(JournalFile *f, int type, Object *o, uint64_t p) { +int journal_file_hmac_put_object(JournalFile *f, ObjectType type, Object *o, uint64_t p) { int r; assert(f); @@ -246,7 +246,7 @@ int journal_file_hmac_put_object(JournalFile *f, int type, Object *o, uint64_t p if (r < 0) return r; } else { - if (type > 0 && o->object.type != type) + if (type > OBJECT_UNUSED && o->object.type != type) return -EBADMSG; }