]> err.no Git - systemd/commitdiff
journal: fix more 32/64 bit issues
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Jan 2012 21:44:43 +0000 (22:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Jan 2012 21:44:43 +0000 (22:44 +0100)
src/journal/journal-file.c
src/journal/journal-file.h

index 6ba3d8dca37797cd159835edb4a542f8de87c2d2..419e15e46fa583c36c808720c2d3e1281e038e10 100644 (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)
index 0be39329219fdef2b0a2aca5def7504c8cd02148..4ef4a14479e88ee023f1c46f5c0fdd766d55c413 100644 (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;