afsmonitor: avoid double free on exit
[openafs.git] / src / mcas / gc.c
index 6037551..4268178 100644 (file)
@@ -34,6 +34,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -43,8 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "portable_defns.h"
 #include "gc.h"
 
-#include <afsconfig.h>
-#include <afs/param.h>
 #include <afs/afsutil.h>
 
 /*#define MINIMAL_GC*/
@@ -53,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /* Recycled nodes are filled with this value if WEAK_MEM_ORDER. */
 #define INVALID_BYTE 0
-#define INITIALISE_NODES(_p,_c) memset((_p), INVALID_BYTE, (_c));
+#define INITIALISE_NODES(_p,_c) memset((_p), INVALID_BYTE, (_c))
 
 /* Number of unique block sizes we can deal with. Equivalently, the
  * number of unique object caches which can be created. */
@@ -358,7 +359,7 @@ static void gc_reclaim(void)
     int           two_ago, three_ago, i, j;
 
     ViceLog(11, ("GC: gc_reclaim enter\n"));
+
     /* Barrier to entering the reclaim critical section. */
     if ( gc_global.inreclaim || CASIO(&gc_global.inreclaim, 0, 1) ) return;