Re: [gtk-vnc-devel] [patch] boolean functions must return FALSE on	failure
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] [patch] boolean functions must return FALSE on	failure
- Date: Wed, 1 Aug 2007 18:06:03 +0100
On Wed, Aug 01, 2007 at 01:57:45PM -0300, Jonh Wendell wrote:
> Hi. This patch changes behavior of boolean functions in gvnc.c (which
> uses gvnc_has_error() ) to return FALSE (instead of TRUE) in case of
> failure. 
> 
> I think it's better to read (and understand):
> if (!gvnc_initialize())
>   handle_error();
> 
> than:
> if (gvnc_initialize())
>   handle_error();
> 
> What do you think?
Yeah, I think this would make things a little less confusing. 
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]