On Sun, 01.12.13 14:50, Shawn Landden (sh...@churchofgit.com) wrote:

> ---
>  src/nspawn/nspawn.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
> index dd7337b..0151cf3 100644
> --- a/src/nspawn/nspawn.c
> +++ b/src/nspawn/nspawn.c
> @@ -481,10 +481,8 @@ static int setup_timezone(const char *dest) {
>                  return 0;
>          }
>  
> -        z = path_startswith(p, "../usr/share/zoneinfo/");
> -        if (!z)
> -                z = path_startswith(p, "/usr/share/zoneinfo/");
> -        if (!z) {
> +        if ((z = path_startswith(p, "../usr/share/zoneinfo/")) ||
> +            (z = path_startswith(p, "/usr/share/zoneinfo/"))) {

Please don't do this. Let's keep our code simply, let's not munge
assignments and checks into one here. We used to do that quite
extensively, but we are actually in the process of converting everything
to the simpler to read scheme where we do assignment and checks in two
steps...

(Well, ther are a few exceptions where doing this one is OK, for
example, inside the checks of while() blocks...)

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to