Fix confusion between boolean and FT_Error return. (#108358, Noah Levitt)

Tue Apr 15 06:03:39 2003  Owen Taylor  <otaylor@redhat.com>

        * pango/opentype/ftxgpos.c: Fix confusion between
        boolean and FT_Error return. (#108358, Noah Levitt)

        * pango/opentype/ftxopen.c (Get_Class1): index is
        allowed to be NULL. (#108358, Noah Levitt)
diff --git a/src/ftxgpos.c b/src/ftxgpos.c
index d611d7c..a71896c 100644
--- a/src/ftxgpos.c
+++ b/src/ftxgpos.c
@@ -4778,12 +4778,13 @@
     if ( class_offset )
       {
         if ( !FILE_Seek( class_offset + base_offset ) )
-          error = Load_ClassDefinition( cd, limit, stream ) == TT_Err_Ok;
+          error = Load_ClassDefinition( cd, limit, stream );
       }
     else
        error = Load_EmptyClassDefinition ( cd, stream );
 
-    (void)FILE_Seek( cur_offset );
+    if (error == TT_ERR_OK)
+      (void)FILE_Seek( cur_offset ); /* Changes error as a side-effect */
 
     return error;
   }
diff --git a/src/ftxopen.c b/src/ftxopen.c
index a072daf..ba605bd 100644
--- a/src/ftxopen.c
+++ b/src/ftxopen.c
@@ -1266,7 +1266,8 @@
     FT_UShort*  cva = cdf1->ClassValueArray;
 
 
-    *index = 0;
+    if ( index )
+      *index = 0;
 
     if ( glyphID >= cdf1->StartGlyph &&
          glyphID <= cdf1->StartGlyph + cdf1->GlyphCount )