2004-09-07 Lutz Mueller <lutz@users.sourceforge.net>
authorLutz Mueller <lutz.s.mueller@gmail.com>
Tue, 7 Sep 2004 20:41:05 +0000 (22:41 +0200)
committerLutz Mueller <lutz.s.mueller@gmail.com>
Tue, 7 Sep 2004 20:41:05 +0000 (22:41 +0200)
* libexif/olympus
* libexif/pentax: Fix typo and wrong logic introduced during my
  last changes. Thanks to Jan Patera
  <patera@pictview.com> for keeping an eye on me.

ChangeLog
libexif/olympus/mnote-olympus-tag.c
libexif/pentax/mnote-pentax-tag.c

index 42dcd54..1d758ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 2004-09-07  Lutz Mueller <lutz@users.sourceforge.net>
 
        * libexif/olympus
+       * libexif/pentax: Fix typo and wrong logic introduced during my
+         last changes. Thanks to Jan Patera
+         <patera@pictview.com> for keeping an eye on me.
+
+2004-09-07  Lutz Mueller <lutz@users.sourceforge.net>
+
+       * libexif/olympus
        * libexif/pentax
        * libexif/canon: Correctly return names, titles and descriptions of
          tages. Pointed out by Angela Wrobel.
index 818ee78..b40c224 100644 (file)
@@ -128,8 +128,8 @@ mnote_olympus_tag_get_name (MnoteOlympusTag 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 *
@@ -139,8 +139,8 @@ mnote_olympus_tag_get_title (MnoteOlympusTag t)
 
        bindtextdomain (GETTEXT_PACKAGE, LIBEXIF_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 *
@@ -150,7 +150,6 @@ mnote_olympus_tag_get_description (MnoteOlympusTag t)
 
        bindtextdomain (GETTEXT_PACKAGE, LIBEXIF_LOCALEDIR);
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
-               if (table[i].tag == t) break;
-       if (!table[i].description) return NULL;
-       return (_(table[i].description));
+               if (table[i].tag == t) return (_(table[i].description));
+       return NULL;
 }
index 664ed69..eb3e8d2 100644 (file)
@@ -66,9 +66,9 @@ mnote_pentax_tag_get_name (MnotePentaxTag t)
 {
        unsigned int i;
 
-       for (i = 0; sizeof (table) / sizeof (table[0]); i++)
-               if (table[i].tag == t) break;
-       return (table[i].name);
+       for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
+               if (table[i].tag == t) return (table[i].name);
+       return NULL;
 }
 
 const char *
@@ -78,8 +78,8 @@ mnote_pentax_tag_get_title (MnotePentaxTag 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 *
@@ -89,6 +89,6 @@ mnote_pentax_tag_get_description (MnotePentaxTag 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;
 }