From: Russ Allbery Date: Sat, 10 Jul 2010 01:06:47 +0000 (-0700) Subject: Fix ktime test for errors X-Git-Tag: openafs-devel-1_5_76~156 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=9e2aba99124f777a209d30ea57cbe92e19130b1f Fix ktime test for errors The variable passed into ktime_DateToLong must be initialized to 0 or, on error, we get the previous value and the tests fail. Change-Id: I5528a830981a85fb6737bb8cb5931ab95faffb13 Reviewed-on: http://gerrit.openafs.org/2379 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/tests/util/ktime-t.c b/tests/util/ktime-t.c index 7b6297b..568cd3a 100644 --- a/tests/util/ktime-t.c +++ b/tests/util/ktime-t.c @@ -78,7 +78,7 @@ main(void) errors = 0; for (tt = testTimes; tt->time; tt++) { - t = 0; + temp = 0; code = ktime_DateToLong(tt->time, &temp); t = temp; if (tt->code == 1) {