Module Name:    src
Committed By:   haad
Date:           Sun May  2 23:59:54 UTC 2010

Modified Files:
        src/external/cddl/osnet/lib/libumem: umem.c

Log Message:
In NetBSD pool cache constructor/destructor routines has inverted arguments.

C


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libumem/umem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/lib/libumem/umem.c
diff -u src/external/cddl/osnet/lib/libumem/umem.c:1.1 src/external/cddl/osnet/lib/libumem/umem.c:1.2
--- src/external/cddl/osnet/lib/libumem/umem.c:1.1	Fri Aug  7 20:57:56 2009
+++ src/external/cddl/osnet/lib/libumem/umem.c	Sun May  2 23:59:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umem.c,v 1.1 2009/08/07 20:57:56 haad Exp $	*/
+/*	$NetBSD: umem.c,v 1.2 2010/05/02 23:59:54 haad Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -135,7 +135,8 @@
 	}
 
 	if(cache->constructor != NULL) {
-		if(cache->constructor(buf, cache->callback_data, flags) != 0) {
+		/* XXX NetBSD pool cache costructor has switched arguments. */
+		if(cache->constructor(cache->callback_data, buf, flags) != 0) {
 			free(buf);
 			if(!(flags & UMEM_NOFAIL))
 				return NULL;
@@ -155,7 +156,8 @@
 void umem_cache_free(umem_cache_t *cache, void *buffer)
 {
 	if(cache->destructor != NULL)
-		cache->destructor(buffer, cache->callback_data);
+		/* XXX NetBSD pool cache costructor has switched arguments. */
+		cache->destructor(cache->callback_data, buffer);
 
 	free(buffer);
 }

Reply via email to