From: Russ Allbery Date: Sat, 10 Jul 2010 01:06:47 +0000 (-0700) Subject: Fix ktime test for errors X-Git-Tag: debian/1.5.75-1~11 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=13a91704abee2ab833d427501e16ae26ea62f8d7;p=packages%2Fo%2Fopenafs.git 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 (cherry picked from commit 9e2aba99124f777a209d30ea57cbe92e19130b1f) --- diff --git a/tests/util/ktime-t.c b/tests/util/ktime-t.c index 7b6297b6d..568cd3a05 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) {