]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: Use size_t instead of unsigned for array sizes
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 31 Oct 2021 12:33:40 +0000 (12:33 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Nov 2021 17:06:55 +0000 (17:06 +0000)
src/libsystemd/sd-journal/journal-file.c

index b4052ad417bfc4f96bd769aa13ad76599b6cbf3c..729c734156ac5f4448246370ba4b9119ee999854 100644 (file)
@@ -497,7 +497,7 @@ static bool warn_wrong_flags(const JournalFile *f, bool compatible) {
                 flags = (flags & any) & ~supported;
                 if (flags) {
                         const char* strv[5];
-                        unsigned n = 0;
+                        size_t n = 0;
                         _cleanup_free_ char *t = NULL;
 
                         if (compatible) {
@@ -2148,7 +2148,7 @@ int journal_file_append_entry(
 
         items = newa(EntryItem, n_iovec);
 
-        for (unsigned i = 0; i < n_iovec; i++) {
+        for (size_t i = 0; i < n_iovec; i++) {
                 uint64_t p;
                 Object *o;