You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/08 07:57:34 UTC
svn commit: r812346 -
/commons/sandbox/runtime/trunk/src/main/native/os/unix/uutils.c
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;
}