]> err.no Git - systemd/commitdiff
util: introduce FORMAT_BYTES_MAX
authorLennart Poettering <lennart@poettering.net>
Sat, 14 Jan 2012 02:06:57 +0000 (03:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 14 Jan 2012 02:06:57 +0000 (03:06 +0100)
src/journal/journal-file.c
src/util.h

index 419e15e46fa583c36c808720c2d3e1281e038e10..59ad84e23b0eb54d31cd992410f4ae1555f6ffbf 100644 (file)
@@ -2103,7 +2103,7 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
 void journal_default_metrics(JournalMetrics *m, int fd) {
         uint64_t fs_size = 0;
         struct statvfs ss;
-        char a[64], b[64], c[64], d[64];
+        char a[FORMAT_BYTES_MAX], b[FORMAT_BYTES_MAX], c[FORMAT_BYTES_MAX], d[FORMAT_BYTES_MAX];
 
         assert(m);
         assert(fd >= 0);
index e6ffad6c2e89554b732ce83d3a870cef3740e78a..5413490c13415beff7865a7425286d8bca8b44f2 100644 (file)
@@ -67,6 +67,7 @@ typedef struct dual_timestamp {
 #define FORMAT_TIMESTAMP_MAX 64
 #define FORMAT_TIMESTAMP_PRETTY_MAX 256
 #define FORMAT_TIMESPAN_MAX 64
+#define FORMAT_BYTES_MAX 8
 
 #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
 #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;32m"