1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00

journal: fix more 32/64 bit issues

This commit is contained in:
Lennart Poettering 2012-01-11 22:44:43 +01:00
parent fdcad0c255
commit b785c858c3
2 changed files with 3 additions and 4 deletions

View File

@ -640,8 +640,7 @@ int journal_file_find_data_object_with_hash(
if (o->object.flags & OBJECT_COMPRESSED) {
#ifdef HAVE_XZ
uint64_t l;
size_t rsize;
uint64_t l, rsize;
l = le64toh(o->object.size);
if (l <= offsetof(Object, data.payload))
@ -652,7 +651,7 @@ int journal_file_find_data_object_with_hash(
if (!uncompress_blob(o->data.payload, l, &f->compress_buffer, &f->compress_buffer_size, &rsize))
return -EBADMSG;
if ((uint64_t) rsize == size &&
if (rsize == size &&
memcmp(f->compress_buffer, data, size) == 0) {
if (ret)

View File

@ -77,7 +77,7 @@ typedef struct JournalFile {
#ifdef HAVE_XZ
void *compress_buffer;
size_t compress_buffer_size;
uint64_t compress_buffer_size;
#endif
} JournalFile;