[virt-tools-list] [PATCH virt-viewer] util: fix glib_check_version() condition

Christophe Fergeau cfergeau at redhat.com
Thu Jun 12 06:21:58 UTC 2014


On Wed, Jun 11, 2014 at 11:54:31AM -0400, Marc-André Lureau wrote:
> 
> 
> ----- Original Message -----
> > On Wed, Jun 11, 2014 at 05:21:59PM +0200, Marc-André Lureau wrote:
> > > glib_check_version() returns NULL if version is higher or equal.
> > > ---
> > >  src/virt-viewer-util.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c
> > > index c81c09a..6fdaa07 100644
> > > --- a/src/virt-viewer-util.c
> > > +++ b/src/virt-viewer-util.c
> > > @@ -283,7 +283,7 @@ static void log_handler(const gchar *log_domain,
> > >                          const gchar *message,
> > >                          gpointer unused_data)
> > >  {
> > > -    if (!glib_check_version(2, 32, 0))
> > > +    if (glib_check_version(2, 32, 0) != NULL)
> > >          if (log_level >= G_LOG_LEVEL_DEBUG && !doDebug)
> > >              return;
> > 
> > 
> > Or maybe this?
> 
> Well, it's not like we are using a different API, so I prefer the dynamic version.

Sorry, I did not understand what you mean in the first part of your
sentence :(

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140612/3cd21168/attachment.sig>


More information about the virt-tools-list mailing list