[virt-tools-list] [PATCH 2/2] Avoid unecessary debug message if returning NULL

Christophe Fergeau cfergeau at redhat.com
Thu Jun 23 16:36:27 UTC 2016


On Thu, Jun 23, 2016 at 10:13:25AM -0300, Eduardo Lima (Etrunko) wrote:
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  src/ovirt-foreign-menu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
> index 9b552eb..959804d 100644
> --- a/src/ovirt-foreign-menu.c
> +++ b/src/ovirt-foreign-menu.c
> @@ -465,10 +465,10 @@ GtkWidget *ovirt_foreign_menu_get_gtk_menu(OvirtForeignMenu *foreign_menu)
>      GList *it;
>      char *current_iso;
>  
> -    g_debug("Creating GtkMenu for foreign menu");
>      if (foreign_menu->priv->iso_names == NULL) {
>          return NULL;
>      }
> +    g_debug("Creating GtkMenu for foreign menu");
>      current_iso = ovirt_foreign_menu_get_current_iso_name(foreign_menu);
>      gtk_menu = gtk_menu_new();
>      for (it = foreign_menu->priv->iso_names; it != NULL; it = it->next) {

Fine with me. Actually it might be more useful to have a log when the
Change CD menu does not show up because the iso name list is empty
rather than having a log when something is going to be shown. So maybe
add an additional g_debug() when NULL is returned?

Christophe

> -- 
> 2.5.5
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20160623/a6ef1c6f/attachment.sig>


More information about the virt-tools-list mailing list