Re: [gtk-vnc-devel] [patch] boolean functions must return FALSE on failure



Daniel P. Berrange wrote:
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.

Me too, good catch!

Regards,

Anthony Liguori

Dan.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]