From: Andre Noll Date: Sun, 10 Feb 2019 11:05:40 +0000 (+0100) Subject: get_snapshot_list(): Add comment about sorting. X-Git-Tag: v1.0.1~1^2~6 X-Git-Url: http://git.tuebingen.mpg.de/dss.git/log?p=dss.git;a=commitdiff_plain;h=fa415abf954777fd0064fd5cbe222f34126bd8ed get_snapshot_list(): Add comment about sorting. Callers rely on the returned snapshot list being sorted by creation time, so let's document this fact. --- diff --git a/snap.c b/snap.c index 8de76d4..da95c1f 100644 --- 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) {