chiark / gitweb /
Add __attribute__((const, pure, format)) in various places
[elogind.git] / src / journal / journal-file.c
index 5b077be0da4748771fb36e83f2b96ede4954cb39..876224dc9ffb69f281c85d7d680c1d7ae2ad8815 100644 (file)
@@ -1325,7 +1325,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
 #endif
 
         /* alloca() can't take 0, hence let's allocate at least one */
-        items = alloca(sizeof(EntryItem) * MAX(1, n_iovec));
+        items = alloca(sizeof(EntryItem) * MAX(1u, n_iovec));
 
         for (i = 0; i < n_iovec; i++) {
                 uint64_t p;
@@ -1712,7 +1712,7 @@ found:
         return 1;
 }
 
-static int test_object_offset(JournalFile *f, uint64_t p, uint64_t needle) {
+_pure_ static int test_object_offset(JournalFile *f, uint64_t p, uint64_t needle) {
         assert(f);
         assert(p > 0);