[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31583 - trunk/subversion/libsvn_wc

From: Philip Martin <philip_at_codematters.co.uk>
Date: Wed, 04 Jun 2008 20:30:48 +0100

Karl Fogel <kfogel_at_red-bean.com> writes:

> Philip Martin <philip_at_codematters.co.uk> writes:
>> blair_at_tigris.org writes:
>>> Author: blair
>>> Date: Wed Jun 4 08:01:31 2008
>>> New Revision: 31583
>>> Log:
>>> * subversion/libsvn_wc/entries.c:
>>> Style change. Replace all
>>> if (! strcmp(a, b))
>>> with
>>> if (strcmp(a, b) == 0)
>> I see this has got into hacking when I wasn't paying attention :-(
> Heh. Didn't know you minded; can you survive? :-)

If there is a consensus, yes.

To my eye strcmp() == 0 is as ugly as the construct 5 == x; I find
!strcmp() is as natural as !ptr. entries.c used both strcmp styles
and ! form was dominant so at least one other developer must agree
with me. I realise styles change; years ago when I started writing C
the people I worked with would only ever have written strcmp() == 0 if
it was mixed with strcmp() > 0 or strcmp() < 0. Writing strcmp() == 0
on it's own it would probably have attracted comments referring to
Pascal, or Modula2, and the subsequent debate would inevitably include
"of course a real programmer would use FORTRAN".

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-04 21:31:07 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.