[libvirt] [PATCH] uitl: use "if and only if" instead of "iff" in some comments

From wiki "In writing, phrases commonly used, with debatable propriety. In logic formulae, logical symbols are used instead of these phrases" In some comments, we use "if and only if", so instead the logical sysbols with phrases in case someone mistaking it as a wrong spelling of "if"
Signed-off-by: Shanzhi Yu <shyu@redhat.com> --- src/util/virhash.c | 2 +- src/util/virstring.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virhash.c b/src/util/virhash.c index e3c1880..e3bf1d3 100644 --- a/src/util/virhash.c +++ b/src/util/virhash.c @@ -65,7 +65,7 @@ struct _virHashTable { uint32_t seed; size_t size; size_t nbElems; - /* True iff we are iterating over hash entries. */ + /* True if and only if we are iterating over hash entries. */ bool iterating; /* Pointer to the current entry during iteration. */ virHashEntryPtr current; diff --git a/src/util/virstring.c b/src/util/virstring.c index 3dad9dd..974005d 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -519,7 +519,7 @@ virStrncpy(char *dest, const char *src, size_t n, size_t destbytes) return NULL; ret = strncpy(dest, src, n); - /* strncpy NULL terminates iff the last character is \0. Therefore + /* strncpy NULL terminates if and only if the last character is \0. Therefore * force the last byte to be \0 */ dest[n] = '\0'; -- 1.9.3

On 10/28/2014 08:00 AM, Shanzhi Yu wrote:
From wiki "In writing, phrases commonly used, with debatable propriety. In logic formulae, logical symbols are used instead of these phrases" In some comments, we use "if and only if", so instead the logical sysbols with phrases in case someone mistaking it as a wrong spelling of "if"
I don't buy it. It's not worth applying, in my mind. Furthermore, any patch that tries to fix "typos" while itself having a typo (s/uitl/util/ in the subject) is suspect. NACK unless anyone else speaks up strongly in favor of it. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 10/28/2014 10:17 PM, Eric Blake wrote:
On 10/28/2014 08:00 AM, Shanzhi Yu wrote:
From wiki "In writing, phrases commonly used, with debatable propriety. In logic formulae, logical symbols are used instead of these phrases" In some comments, we use "if and only if", so instead the logical sysbols with phrases in case someone mistaking it as a wrong spelling of "if" I don't buy it. It's not worth applying, in my mind.
Furthermore, any patch that tries to fix "typos" while itself having a typo (s/uitl/util/ in the subject) is suspect. shame on me ... NACK unless anyone else speaks up strongly in favor of it.
-- Regards shyu
participants (2)
-
Eric Blake
-
Shanzhi Yu