Use bitwise & when operating on flags. (#399971, Jon Oberheide)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 24 Jan 2007 04:02:33 +0000 (04:02 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 24 Jan 2007 04:02:33 +0000 (04:02 +0000)
2007-01-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/goption.c (print_help): Use bitwise &
        when operating on flags.  (#399971, Jon Oberheide)

svn path=/trunk/; revision=5308

ChangeLog
glib/goption.c

index 93e5452..20bf7c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-23  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (print_help): Use bitwise &
+       when operating on flags.  (#399971, Jon Oberheide)
+
 2007-01-19  Matthias Clasen  <mclasen@redhat.com>
 
        Some file list updates (#398069, Owen Taylor)
index 5d08e30..b0fcab7 100644 (file)
@@ -581,13 +581,13 @@ print_help (GOptionContext *context,
        {
          entry = &group->entries[i];
          if (g_hash_table_lookup (shadow_map, entry->long_name) && 
-             !(entry->flags && G_OPTION_FLAG_NOALIAS))
+             !(entry->flags & G_OPTION_FLAG_NOALIAS))
            entry->long_name = g_strdup_printf ("%s-%s", group->name, entry->long_name);
          else  
            g_hash_table_insert (shadow_map, (gpointer)entry->long_name, entry);
 
          if (seen[(guchar)entry->short_name] && 
-             !(entry->flags && G_OPTION_FLAG_NOALIAS))
+             !(entry->flags & G_OPTION_FLAG_NOALIAS))
            entry->short_name = 0;
          else
            seen[(guchar)entry->short_name] = TRUE;