]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libuuid: return correct value for uuid_generate_time_safe
authorRomain Bouvier <skunnyk@alteroot.org>
Wed, 17 Jun 2015 15:59:18 +0000 (15:59 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 18 Jun 2015 10:12:16 +0000 (12:12 +0200)
commitc893f5e462265b59cd0c27bd38b6355e799a302a
treebf80dbbf679510b1331d9c3d991d3ddfacd99c55
parentacb7651f8897ae73d0f45dd75bc87630001c61b9
libuuid: return correct value for uuid_generate_time_safe

Make return value consistent for consecutive calls.  If you call
uuid_generate_time_safe, it should always return -1 if it can't guarantee
uniqueness.  Without this patch, on consecutive calls where it can't guarantee
uniqueness, the first call returns -1, but later calls return 0.

Reported-by: Romain Bouvier <skunnyk@alteroot.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
libuuid/src/gen_uuid.c