compare_snapshots(): Add const keyword.
[dss.git] / snap.c
diff --git a/snap.c b/snap.c
index d1caf56ed442a0eed2d1f9d0a80b90262162f717..71b7e30c5f9d248c4815d0c8d0e409eb6c41254e 100644 (file)
--- a/snap.c
+++ b/snap.c
@@ -146,8 +146,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);
 }