]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix ktime test for errors
authorRuss Allbery <rra@stanford.edu>
Sat, 10 Jul 2010 01:06:47 +0000 (18:06 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 13 Jul 2010 03:04:06 +0000 (20:04 -0700)
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 <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9e2aba99124f777a209d30ea57cbe92e19130b1f)

tests/util/ktime-t.c

index 7b6297b6d8c9a6dc34ff9c211df995f1d834734f..568cd3a052969df372fe000e0f598747b9eaf855 100644 (file)
@@ -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) {