[haiku-commits] Re: haiku: hrev45146 - src/libs/compat/freebsd_network

  • From: Urias McCullough <umccullough@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 10 Jan 2013 14:41:28 -0800

>  {
> -       if (options == MTX_DEF) {
> +       if (options & MTX_DEF) {
>                 mutex_init_etc(&mutex->u.mutex.lock, name, 
> MUTEX_FLAG_CLONE_NAME);
>                 mutex->u.mutex.owner = -1;
> -       } else if (options == MTX_RECURSE) {
> +       } else if (options & MTX_RECURSE) {
>                 recursive_lock_init_etc(&mutex->u.recursive, name,
>                         MUTEX_FLAG_CLONE_NAME);
>         } else

If that's the case, shouldn't those theoretically be separate if
statements rather than using else?

Or are those mutually-exclusive flags?

- Urias

Other related posts: