commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r812346 - /commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c
Date Tue, 08 Sep 2009 05:57:34 GMT
Author: mturk
Date: Tue Sep  8 05:57:34 2009
New Revision: 812346

URL: http://svn.apache.org/viewvc?rev=812346&view=rev
Log:
Merge redundant code

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c?rev=812346&r1=812345&r2=812346&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c Tue Sep  8 05:57:34 2009
@@ -58,17 +58,18 @@
         }
         else {
             free(rb);
-            fclose(f);
-            errno = rc;
-            return NULL;
+            goto cleanup;
         }
     }
     else {
         rc = errno;
-        fclose(f);
-        errno = rc;
-        return NULL;
+        goto cleanup;
     }
     fclose(f);
     return rb;
+
+cleanup:
+    fclose(f);
+    errno = rc;
+    return NULL;
 }



Mime
View raw message