Fixed wrong logic introduced on Sep 7th (This is the last module not yet fixed)
authorJan Patera <patera@pictview.com>
Wed, 15 Sep 2004 16:40:04 +0000 (18:40 +0200)
committerJan Patera <patera@pictview.com>
Wed, 15 Sep 2004 16:40:04 +0000 (18:40 +0200)
libexif/canon/mnote-canon-tag.c

index e391f8a..7798390 100644 (file)
@@ -48,8 +48,8 @@ mnote_canon_tag_get_name (MnoteCanonTag t)
        unsigned int i;
 
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
-               if (table[i].tag == t) break;
-       return (_(table[i].name));
+               if (table[i].tag == t) return (_(table[i].name));
+       return NULL;
 }
 
 const char *
@@ -59,8 +59,8 @@ mnote_canon_tag_get_title (MnoteCanonTag t)
 
        bindtextdomain (GETTEXT_PACKAGE, LIBMNOTE_LOCALEDIR); 
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
-               if (table[i].tag == t) break; 
-       return (_(table[i].title));
+               if (table[i].tag == t) return (_(table[i].title));
+       return NULL;
 }
 
 const char *
@@ -70,6 +70,6 @@ mnote_canon_tag_get_description (MnoteCanonTag t)
 
        bindtextdomain (GETTEXT_PACKAGE, LIBMNOTE_LOCALEDIR);
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
-               if (table[i].tag == t) break;
-       return (_(table[i].description));
+               if (table[i].tag == t) return (_(table[i].description));
+       return NULL;
 }