X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=blobdiff_plain;f=snap.c;h=aef0c51203a26b35233ed811f0fb498aa5ec5967;hp=d1caf56ed442a0eed2d1f9d0a80b90262162f717;hb=19982b7b17a603bd4a0b47c724b4e830daaf88d9;hpb=b28495993eef26688c998650d0e2bf944082704e diff --git a/snap.c b/snap.c index d1caf56..aef0c51 100644 --- a/snap.c +++ b/snap.c @@ -14,11 +14,11 @@ #include #include "gcc-compat.h" -#include "error.h" +#include "err.h" #include "snap.h" -#include "string.h" -#include "time.h" -#include "fd.h" +#include "str.h" +#include "tv.h" +#include "file.h" /** * Wrapper for isdigit. @@ -75,7 +75,6 @@ static int is_snapshot(const char *dirname, int64_t now, int unit_interval, if (num > now) return 0; s->creation_time = num; - //DSS_DEBUG_LOG("%s start time: %lli\n", dirname, (long long)s->creation_time); s->interval = (long long) ((now - s->creation_time) / unit_interval / 24 / 3600); if (!strcmp(dash + 1, "incomplete")) { @@ -146,8 +145,8 @@ static int add_snapshot(const char *dirname, void *private) static int compare_snapshots(const void *a, const void *b) { - struct snapshot *s1 = *(struct snapshot **)a; - struct snapshot *s2 = *(struct snapshot **)b; + struct snapshot *s1 = *(struct snapshot * const *)a; + struct snapshot *s2 = *(struct snapshot * const *)b; return NUM_COMPARE(s2->creation_time, s1->creation_time); }