qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] Fix spelling in comments (iff ->


From: Anthony Liguori
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] Fix spelling in comments (iff -> if)
Date: Sun, 26 Feb 2012 14:01:56 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 02/26/2012 12:58 PM, Stefan Weil wrote:
Am 26.02.2012 17:39, schrieb Anthony Liguori:
On 02/26/2012 07:39 AM, Stefan Weil wrote:
Signed-off-by: Stefan Weil<address@hidden>
---
a.out.h | 2 +-
arm-dis.c | 22 +++++++++++-----------
block.c | 2 +-
block/qcow2-refcount.c | 4 ++--
hw/alpha_typhoon.c | 2 +-
hw/hid.h | 2 +-
hw/pcnet.c | 2 +-
m68k-dis.c | 4 ++--
memory.h | 4 ++--
monitor.c | 2 +-
net/socket.c | 2 +-
qemu-img.c | 2 +-
tcg/hppa/tcg-target.c | 6 +++---
13 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/a.out.h b/a.out.h
index 33ca7f7..7ea8d5a 100644
--- a/a.out.h
+++ b/a.out.h
@@ -136,7 +136,7 @@ struct external_scnhdr {
*/
struct external_lineno {
union {
- host_ulong l_symndx; /* function name symbol index, iff l_lnno 0 */

I don't know if this is the intention but this may be short hand for 'if and
only if'. I do use this short hand quite a bit myself.

http://en.wikipedia.org/wiki/If_and_only_if

Regards,

Anthony Liguori

Thank you for this information which was new for me.

I reviewed my own patch, and there are indeed some 'iff' which might
be used for 'if and only if'. Others cannot have this meaning because
there are several alternatives with the same result. For the
description of function return values 'if and only if' also looks strange.
Some comments just translate an if statement in text.
Here 'if and only if' would not match the C code which only says 'if'.

I'll send new patches for these different categories, then it will
be easier to accept or reject them.

Many authors regard "iff" as unsuitable in formal writing
(citation from Wikipedia).Personally, I'd also prefer to see
'if and only if' in full length or in symbolic notation (<==>)
when this is the intention, not an abbreviation like 'iff'.

Yup, just pointing out that in some cases it may be intentional.

Regards,

Anthony Liguori


Regards,

Stefan Weil






reply via email to

[Prev in Thread] Current Thread [Next in Thread]