< prev index next >

src/java.desktop/share/native/liblcms/cmserr.c

Print this page

        

@@ -119,13 +119,13 @@
 static
 void* _cmsMallocDefaultFn(cmsContext ContextID, cmsUInt32Number size)
 {
     if (size > MAX_MEMORY_FOR_ALLOC) return NULL;  // Never allow over maximum
 
+    cmsUNUSED_PARAMETER(ContextID);
     return (void*) malloc(size);
 
-    cmsUNUSED_PARAMETER(ContextID);
 }
 
 // Generic allocate & zero
 static
 void* _cmsMallocZeroDefaultFn(cmsContext ContextID, cmsUInt32Number size)

@@ -153,16 +153,16 @@
 // The default realloc function. Again it checks for exploits. If Ptr is NULL,
 // realloc behaves the same way as malloc and allocates a new block of size bytes.
 static
 void* _cmsReallocDefaultFn(cmsContext ContextID, void* Ptr, cmsUInt32Number size)
 {
+    cmsUNUSED_PARAMETER(ContextID);
 
     if (size > MAX_MEMORY_FOR_ALLOC) return NULL;  // Never realloc over 512Mb
 
     return realloc(Ptr, size);
 
-    cmsUNUSED_PARAMETER(ContextID);
 }
 
 
 // The default calloc function. Allocates an array of num elements, each one of size bytes
 // all memory is initialized to zero.
< prev index next >