[Box Backup-dev] COMMIT r759 - box/chris/general/bin/bbackupd

Martin Ebourne boxbackup-dev@fluffy.co.uk
Thu, 10 Aug 2006 01:22:17 +0100


On Wed, 2006-08-09 at 23:25 +0000, subversion@fluffy.co.uk wrote:
> * Win32ServiceFunctions.cpp
> - Fixed bracketing to avoid precedence problem, misinterpretation by MSVC
>
> -		if (! st.st_mode & S_IFREG)
> +		if (!(st.st_mode & S_IFREG))

MSVC is correct here.

! is higher precedence than &, and ! is of course the logical not
operator rather than the bitwise not operator.

    if (~st.st_mode & S_IFREG)
would have worked too, but what you have is probably clearer.

Cheers,

Martin.