]> git.tuebingen.mpg.de Git - dss.git/commit
Fix off-by-one bug in find_outdated_snapshot().
authorAndre Noll <maan@systemlinux.org>
Thu, 27 Aug 2009 12:55:02 +0000 (14:55 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 27 Aug 2009 12:55:02 +0000 (14:55 +0200)
commit676f0d8d399ade79ff579e28787a63f00bdf2ce3
tree170dedf27ae3937f5eea1311dbb3b0dac5a22ac8
parent0ba29646cbd80a8bb7bdf827352bd1332217c398
Fix off-by-one bug in find_outdated_snapshot().

The man page sayeth:

"dss removes any snapshots older than n times u",

where n is the number of unit intervals and u is the duration of
a unit interval. As intervals count from zero, this means that a
snapshot should be considered outdated if its interval number
is greater _or equal_ than n.

However, the current code only removes snapshots in intervals
strictly greater than n. Fix this bug and clarify the documentation.
dss.c
dss.ggo