[Box Backup-dev] [PATCH] Win32 merge [05] bbackupd

Chris Wilson boxbackup-dev@fluffy.co.uk
Wed, 9 Aug 2006 10:23:29 +0100 (BST)


Hi Martin,

On Wed, 9 Aug 2006, Martin Ebourne wrote:

> Why the chained elseifs? switch would be cleaner and less error prone.

I actually find elseifs easier to read. The exact condition being tested 
is always at hand; there's no break/fallthrough nonsense that can easily 
confuse, and indentation is not a problem.

Besides, I've done a lot of Perl coding, where switch doesn't exist, and 
Java, where it's effectively useless because there are no integer 
constants, so I'm out of the habit of using switch.

> These should be part of the same changeset that adds the code back into
> Daemon.cpp. Then there would be no breakage and everything would be
> consistent. Prefer change based merge to file based merge. :)
>
> Notwithstanding the above, the rest of it looks fine to me.

Breaking up into separate patches. First one is at:

   svn diff -r 728:729 http://bbdev.fluffy.co.uk/svn/box/chris/merge

Whitespace fix. Please review.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |