On Thu, Mar 13, 2014 at 04:39:37PM -0700, Kay Sievers wrote:
> .gitignore | 1
> Makefile.am | 27 +
> src/timedate/test-timedate-sntp.c | 107 ++++++
> src/timedate/timedate-sntp.c | 652
> ++++++++++++++++++++++++++++++++++++++
> src/timedate/timedate-sntp.h | 33 +
> 5 files changed, 817 insertions(+), 3 deletions(-)
>
> New commits:
> commit bcdbbd7ee1b7dc6ec19261c957ed11e5e1ed1aaf
> Author: Kay Sievers <[email protected]>
> Date: Mon Mar 10 22:15:56 2014 +0100
>
> timedated: add SNTP client/query hookup (unused for now)
Interesting :)
> +static int log2i(int a) {
> + int exp = 0;
> +
> + assert(a > 0);
> +
> + while (a > 0) {
> + a >>= 1;
> + exp++;
> + }
> +
> + return exp;
> +}
>
> +static double log2d(int a) {
> + if (a < 0)
> + return 1.0 / (1UL << - a);
> + return 1UL << a;
> +}
I pushed a replacement for those two which uses builtins.
Zbyszek
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel