projects
/
dss.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b284959
)
compare_snapshots(): Add const keyword.
author
Daniel Richard G
<skunk@iSKUNK.ORG>
Sat, 4 Aug 2012 11:20:17 +0000
(13:20 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 4 Aug 2012 11:34:52 +0000
(13:34 +0200)
This fixes a "cast drops const qualifier" warning.
snap.c
patch
|
blob
|
history
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);
}