]> git.tue.mpg.de Git - dss.git/commitdiff
get_snapshot_list(): Add comment about sorting.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Feb 2019 11:05:40 +0000 (12:05 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Sep 2019 13:08:40 +0000 (15:08 +0200)
Callers rely on the returned snapshot list being sorted by creation
time, so let's document this fact.

snap.c

diff --git a/snap.c b/snap.c
index 8de76d459da1a8844a452fa576d706014b229be9..da95c1f342dc09bcc01d1eef58a075dd721472ef 100644 (file)
--- a/snap.c
+++ b/snap.c
@@ -146,7 +146,7 @@ static int compare_snapshots(const void *a, const void *b)
        return NUM_COMPARE(s2->creation_time, s1->creation_time);
 }
 
-
+/* The returned snapshot list is sorted by creation time. */
 void get_snapshot_list(struct snapshot_list *sl, int unit_interval,
                int num_intervals)
 {