From: =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont <remi@remlab.net>
To: ofono@ofono.org
Subject: Re: [PATCH 3/3] Add: online and post_online methods to isimodem driver
Date: Wed, 26 May 2010 00:01:16 +0300 [thread overview]
Message-ID: <201005260001.17101.remi@remlab.net> (raw)
In-Reply-To: <1274820669.3755.448.camel@tucson.research.nokia.com>
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
Le mardi 25 mai 2010 23:51:09 Aki Niemi, vous avez écrit :
> > i.e. if ISI online status equals to MTC state normal, then no error,
> > otherwise, error. C does not provide a *logical* XOR operator that would
> > simplify this.
>
> It just isn't very readable.
>
> Write that open, and I am able to parse it, so I think something like
> this would be better:
>
> bool not_online = isi->online != TRUE;
> bool not_normal = mtc_state != MTC_NORMAL;
>
> struct ofono_error error = {
> not_normal && not_online ? NO_ERROR : FAILURE;
> };
Err no. You've put a logical AND where Pekka had a logical NOT XOR.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
next prev parent reply other threads:[~2010-05-25 21:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 14:25 [PATCH 1/3] Add: Online property to modem Pekka Pessi
2010-05-21 14:25 ` [PATCH 2/3] Add: test scripts online-modem and offline-modem Pekka Pessi
2010-05-21 14:25 ` [PATCH 3/3] Add: online and post_online methods to isimodem driver Pekka Pessi
2010-05-25 20:24 ` Aki Niemi
2010-05-25 20:32 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-05-25 20:51 ` Aki Niemi
2010-05-25 21:01 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont [this message]
2010-05-25 21:24 ` Aki Niemi
2010-05-25 13:48 ` [PATCH 1/3] Add: Online property to modem Aki Niemi
2010-05-25 14:01 ` Aki Niemi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201005260001.17101.remi@remlab.net \
--to=remi@remlab.net \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.