Re: [hackers] [ubase][PATCH] hwclock: [-rsw] => (-r | -s | -w) and fix flag check

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Fri, 22 Apr 2016 10:01:18 +0200

On Fri, Apr 22, 2016 at 03:24:47AM +0200, Mattias Andrée wrote:
> Also in man page: [-r | -s | -w] => (-r | -s | -w)
>
> 8< ... snippity snip ...>8
>
> int
> _AT_@ -141,7 +141,7 @@ main(int argc, char *argv[])
> else if (argc == 1)
> dev = argv[0];
>
> - if ((rflag ^ sflag ^ wflag) == 0)
> + if (rflag + sflag + wflag != 1)
> eprintf("missing or incompatible function\n");

This is not the same in behaviour. Is it intended? I think the patch makes
sense though.

Thanks for the patches,

Kind regards,
Hiltjo
Received on Fri Apr 22 2016 - 10:01:18 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 22 2016 - 10:12:14 CEST