]> git.tuebingen.mpg.de Git - dss.git/commitdiff
use C99-compliant format strings for consistency reasons
authorSebastian Stark <stark@sambesi.kyb.local>
Wed, 22 Oct 2008 15:14:30 +0000 (17:14 +0200)
committerSebastian Stark <stark@sambesi.kyb.local>
Wed, 22 Oct 2008 15:14:30 +0000 (17:14 +0200)
snap.c
time.c

diff --git a/snap.c b/snap.c
index a5749a93293782cd1411c92d60829cb51c926688..89d6004b6cb1731a73583d0d4ac07b469b3db916 100644 (file)
--- a/snap.c
+++ b/snap.c
@@ -188,17 +188,15 @@ void free_snapshot_list(struct snapshot_list *sl)
 
 __malloc char *incomplete_name(int64_t start)
 {
-       return make_message("%lli-incomplete", (long long)start);
+       return make_message("%" PRId64 "-incomplete", start);
 }
 
 __malloc char *being_deleted_name(struct snapshot *s)
 {
        if (s->flags & SS_COMPLETE)
-               return make_message("%lli-%lli.being_deleted",
-                       (long long)s->creation_time,
-                       (long long)s->completion_time);
-       return make_message("%lli-incomplete.being_deleted",
-               (long long)s->creation_time);
+               return make_message("%" PRId64 "-%" PRId64 ".being_deleted",
+                       s->creation_time, s->completion_time);
+       return make_message("%" PRId64 "-incomplete.being_deleted", s->creation_time);
 }
 
 int complete_name(int64_t start, int64_t end, char **result)
@@ -216,7 +214,7 @@ int complete_name(int64_t start, int64_t end, char **result)
                return -E_STRFTIME;
        if (!strftime(end_str, sizeof(end_str), "%a_%b_%d_%Y_%H_%M_%S", &end_tm))
                return -E_STRFTIME;
-       *result = make_message("%lli-%lli.%s-%s", (long long) start, (long long) end,
+       *result = make_message("%" PRId64 "-%" PRId64 ".%s-%s", start, end,
                start_str, end_str);
        return 1;
 }
diff --git a/time.c b/time.c
index 6c8169f4a62c8174695598bd6c07bf756cd1b917..41db7bf5cf43e7988ac096c8ca9170ec947e61a8 100644 (file)
--- a/time.c
+++ b/time.c
@@ -141,6 +141,6 @@ int64_t get_current_time(void)
 {
        time_t now;
        time(&now);
-       DSS_DEBUG_LOG("now: %lli\n", (long long) now);
+       DSS_DEBUG_LOG("now: %jd\n", (intmax_t)now);
        return (int64_t)now;
 }