]> git.michaelhowe.org Git - packages/o/openafs.git/commit
rx: Make clock_Add correctly add to itself
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 18 Jun 2011 10:48:45 +0000 (11:48 +0100)
committerDerrick Brashear <shadow@dementia.org>
Wed, 22 Jun 2011 01:58:51 +0000 (18:58 -0700)
commit784babbea1247660f39463403233589a74c6e73b
tree3bc7826ebd48b4cb168af32d3563496e7a882fb4
parent280c80152522f32cf34deae96696b1db8aaaa9bb
rx: Make clock_Add correctly add to itself

With the existing clock_Add code, the following:
    struct clock a = {2, 800000};
    clock_Add(&a, &a);
gives a clock value of {6, 600000}, rather than the expected {5, 60000}.

This is because the ordering of instructions leads it to double count
the carry on the seconds field. Reorder the instructions so that the
carry is correctly applied.

Change-Id: Ia71b387ce521a11e4caf9ec200907efe1d2be8ff
Reviewed-on: http://gerrit.openafs.org/4864
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/rx/rx_clock.h