Index: trunk/psLib/src/collections/psMetadata.c
===================================================================
--- trunk/psLib/src/collections/psMetadata.c	(revision 1385)
+++ trunk/psLib/src/collections/psMetadata.c	(revision 1387)
@@ -11,6 +11,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-04 23:37:39 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-05 02:22:42 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -266,21 +266,20 @@
             return false;
         }
-    } else
-        if ( value != NULL ) {
-
-            // The key was found and the new metadata item is a folder node. Don't add new metadata item, since
-            // it will wipe out existing node.
-            psError( __func__, "Metadata already exists in metadata collection. Item not added. Name: %s",
+    } else if ( value != NULL ) {
+
+        // The key was found and the new metadata item is a folder node. Don't add new metadata item, since
+        // it will wipe out existing node.
+        psError( __func__, "Metadata already exists in metadata collection. Item not added. Name: %s",
+                 metadataItem->name );
+        return false;
+    } else {
+
+        // Duplicate key not found. Add new metadata item to metadata collection's hash
+        if ( !psHashAdd( mdTable, key, metadataItem ) ) {
+            psError( __func__, "Couldn't add metadata item to metadata collection table. Name: %s",
                      metadataItem->name );
             return false;
-        } else {
-
-            // Duplicate key not found. Add new metadata item to metadata collection's hash
-            if ( !psHashAdd( mdTable, key, metadataItem ) ) {
-                psError( __func__, "Couldn't add metadata item to metadata collection table. Name: %s",
-                         metadataItem->name );
-                return false;
-            }
-        }
+        }
+    }
 
     // Add all items to metadata collection's list, even if they have the same metadata item names
@@ -600,9 +599,8 @@
         psError( __func__, "Null extname AND extnum = 0 not allowed" );
         return NULL;
-    } else
-        if ( extname && extnum ) {
-            psError( __func__, "Both extname AND extnum arguments should not have values." );
-            return NULL;
-        }
+    } else if ( extname && extnum ) {
+        psError( __func__, "Both extname AND extnum arguments should not have values." );
+        return NULL;
+    }
 
     // Allocate metadata if user didn't
@@ -619,14 +617,13 @@
             return output;
         }
-    } else
-        if ( extnum > 0 ) {
-            tempExtname = ( char* ) extname;
-            if ( fits_movnam_hdu( fd, ANY_HDU, tempExtname, 0, &status ) != 0 ) {
-                fits_get_errstatus( status, fitsErr );
-                psError( __func__, "FITS error while locating header: %s", fitsErr );
-                status = 0;
-                return output;
-            }
-        }
+    } else if ( extnum > 0 ) {
+        tempExtname = ( char* ) extname;
+        if ( fits_movnam_hdu( fd, ANY_HDU, tempExtname, 0, &status ) != 0 ) {
+            fits_get_errstatus( status, fitsErr );
+            psError( __func__, "FITS error while locating header: %s", fitsErr );
+            status = 0;
+            return output;
+        }
+    }
 
     // Get number of key names
