@@ -61,24 +61,24 @@ PDCcont_create(const char *cont_name, pdcid_t cont_prop_id)
6161
6262 FUNC_ENTER (NULL );
6363
64- p = PDC_MALLOC (struct _pdc_cont_info );
64+ p = (struct _pdc_cont_info * ) PDC_malloc ( sizeof ( struct _pdc_cont_info ) );
6565 if (!p )
6666 PGOTO_ERROR (0 , "PDC container memory allocation failed" );
6767
68- p -> cont_info_pub = PDC_MALLOC (struct pdc_cont_info );
68+ p -> cont_info_pub = (struct pdc_cont_info * ) PDC_malloc ( sizeof ( struct pdc_cont_info ) );
6969 if (!p -> cont_info_pub )
7070 PGOTO_ERROR (0 , "PDC pub container memory allocation failed" );
7171 p -> cont_info_pub -> name = strdup (cont_name );
7272
7373 id_info = PDC_find_id (cont_prop_id );
7474 cont_prop = (struct _pdc_cont_prop * )(id_info -> obj_ptr );
7575
76- p -> cont_pt = PDC_CALLOC ( 1 , struct _pdc_cont_prop );
76+ p -> cont_pt = ( struct _pdc_cont_prop * ) PDC_calloc ( 1 , sizeof ( struct _pdc_cont_prop ) );
7777 if (!p -> cont_pt )
7878 PGOTO_ERROR (0 , "PDC container prop memory allocation failed" );
7979 memcpy (p -> cont_pt , cont_prop , sizeof (struct _pdc_cont_prop ));
8080
81- p -> cont_pt -> pdc = PDC_CALLOC ( 1 , struct _pdc_class );
81+ p -> cont_pt -> pdc = ( struct _pdc_class * ) PDC_calloc ( 1 , sizeof ( struct _pdc_class ) );
8282 if (!p -> cont_pt -> pdc )
8383 PGOTO_ERROR (0 , "PDC container pdc class memory allocation failed" );
8484 if (cont_prop -> pdc -> name )
@@ -110,24 +110,24 @@ PDCcont_create_col(const char *cont_name, pdcid_t cont_prop_id)
110110
111111 FUNC_ENTER (NULL );
112112
113- p = PDC_MALLOC (struct _pdc_cont_info );
113+ p = (struct _pdc_cont_info * ) PDC_malloc ( sizeof ( struct _pdc_cont_info ) );
114114 if (!p )
115115 PGOTO_ERROR (0 , "PDC container memory allocation failed" );
116116
117- p -> cont_info_pub = PDC_MALLOC (struct pdc_cont_info );
117+ p -> cont_info_pub = (struct pdc_cont_info * ) PDC_malloc ( sizeof ( struct pdc_cont_info ) );
118118 if (!p -> cont_info_pub )
119119 PGOTO_ERROR (0 , "PDC pub container memory allocation failed" );
120120 p -> cont_info_pub -> name = strdup (cont_name );
121121
122122 id_info = PDC_find_id (cont_prop_id );
123123 cont_prop = (struct _pdc_cont_prop * )(id_info -> obj_ptr );
124124
125- p -> cont_pt = PDC_CALLOC ( 1 , struct _pdc_cont_prop );
125+ p -> cont_pt = ( struct _pdc_cont_prop * ) PDC_calloc ( 1 , sizeof ( struct _pdc_cont_prop ) );
126126 if (!p -> cont_pt )
127127 PGOTO_ERROR (0 , "PDC container prop memory allocation failed" );
128128 memcpy (p -> cont_pt , cont_prop , sizeof (struct _pdc_cont_prop ));
129129
130- p -> cont_pt -> pdc = PDC_CALLOC ( 1 , struct _pdc_class );
130+ p -> cont_pt -> pdc = ( struct _pdc_class * ) PDC_calloc ( 1 , sizeof ( struct _pdc_class ) );
131131 if (!p -> cont_pt -> pdc )
132132 PGOTO_ERROR (0 , "PDC container pdc class memory allocation failed" );
133133 if (cont_prop -> pdc -> name )
@@ -157,11 +157,11 @@ PDC_cont_create_local(pdcid_t pdc, const char *cont_name, uint64_t cont_meta_id)
157157
158158 FUNC_ENTER (NULL );
159159
160- p = PDC_MALLOC (struct _pdc_cont_info );
160+ p = (struct _pdc_cont_info * ) PDC_malloc ( sizeof ( struct _pdc_cont_info ) );
161161 if (!p )
162162 PGOTO_ERROR (0 , "PDC container memory allocation failed" );
163163
164- p -> cont_info_pub = PDC_MALLOC (struct pdc_cont_info );
164+ p -> cont_info_pub = (struct pdc_cont_info * ) PDC_malloc ( sizeof ( struct pdc_cont_info ) );
165165 if (!p )
166166 PGOTO_ERROR (0 , "PDC container memory allocation failed" );
167167 p -> cont_info_pub -> name = strdup (cont_name );
@@ -171,12 +171,12 @@ PDC_cont_create_local(pdcid_t pdc, const char *cont_name, uint64_t cont_meta_id)
171171
172172 id_info = PDC_find_id (cont_prop_id );
173173 cont_prop = (struct _pdc_cont_prop * )(id_info -> obj_ptr );
174- p -> cont_pt = PDC_CALLOC ( 1 , struct _pdc_cont_prop );
174+ p -> cont_pt = ( struct _pdc_cont_prop * ) PDC_calloc ( 1 , sizeof ( struct _pdc_cont_prop ) );
175175 if (!p -> cont_pt )
176176 PGOTO_ERROR (0 , "PDC container prop memory allocation failed" );
177177 memcpy (p -> cont_pt , cont_prop , sizeof (struct _pdc_cont_prop ));
178178
179- p -> cont_pt -> pdc = PDC_CALLOC ( 1 , struct _pdc_class );
179+ p -> cont_pt -> pdc = ( struct _pdc_class * ) PDC_calloc ( 1 , sizeof ( struct _pdc_class ) );
180180 if (!p -> cont_pt -> pdc )
181181 PGOTO_ERROR (0 , "PDC container pdc class memory allocation failed" );
182182
@@ -222,11 +222,11 @@ PDC_cont_close(struct _pdc_cont_info *cp)
222222 FUNC_ENTER (NULL );
223223
224224 free ((void * )(cp -> cont_info_pub -> name ));
225- cp -> cont_info_pub = PDC_FREE (struct pdc_cont_info , cp -> cont_info_pub );
225+ cp -> cont_info_pub = (struct pdc_cont_info * )( intptr_t ) PDC_free ( cp -> cont_info_pub );
226226 free (cp -> cont_pt -> pdc -> name );
227- cp -> cont_pt -> pdc = PDC_FREE (struct _pdc_class , cp -> cont_pt -> pdc );
228- cp -> cont_pt = PDC_FREE (struct _pdc_cont_prop , cp -> cont_pt );
229- cp = PDC_FREE (struct _pdc_cont_info , cp );
227+ cp -> cont_pt -> pdc = (struct _pdc_class * )( intptr_t ) PDC_free ( cp -> cont_pt -> pdc );
228+ cp -> cont_pt = (struct _pdc_cont_prop * )( intptr_t ) PDC_free ( cp -> cont_pt );
229+ cp = (struct _pdc_cont_info * )( intptr_t ) PDC_free ( cp );
230230
231231 FUNC_LEAVE (ret_value );
232232}
@@ -321,25 +321,25 @@ PDC_cont_get_info(pdcid_t cont_id)
321321 PGOTO_ERROR (NULL , "cannot locate object" );
322322
323323 info = (struct _pdc_cont_info * )(id_info -> obj_ptr );
324- ret_value = PDC_CALLOC ( 1 , struct _pdc_cont_info );
324+ ret_value = ( struct _pdc_cont_info * ) PDC_calloc ( 1 , sizeof ( struct _pdc_cont_info ) );
325325 if (ret_value )
326326 memcpy (ret_value , info , sizeof (struct _pdc_cont_info ));
327327 else
328328 PGOTO_ERROR (NULL , "cannot allocate ret_value" );
329329
330- ret_value -> cont_info_pub = PDC_CALLOC ( 1 , struct pdc_cont_info );
330+ ret_value -> cont_info_pub = ( struct pdc_cont_info * ) PDC_calloc ( 1 , sizeof ( struct pdc_cont_info ) );
331331 if (ret_value -> cont_info_pub )
332332 memcpy (ret_value -> cont_info_pub , info -> cont_info_pub , sizeof (struct pdc_cont_info ));
333333
334334 if (info -> cont_info_pub -> name )
335335 ret_value -> cont_info_pub -> name = strdup (info -> cont_info_pub -> name );
336336
337- ret_value -> cont_pt = PDC_MALLOC (struct _pdc_cont_prop );
337+ ret_value -> cont_pt = (struct _pdc_cont_prop * ) PDC_malloc ( sizeof ( struct _pdc_cont_prop ) );
338338 if (ret_value -> cont_pt )
339339 memcpy (ret_value -> cont_pt , info -> cont_pt , sizeof (struct _pdc_cont_prop ));
340340 else
341341 PGOTO_ERROR (NULL , "cannot allocate ret_value->cont_pt" );
342- ret_value -> cont_pt -> pdc = PDC_CALLOC ( 1 , struct _pdc_class );
342+ ret_value -> cont_pt -> pdc = ( struct _pdc_class * ) PDC_calloc ( 1 , sizeof ( struct _pdc_class ) );
343343 if (ret_value -> cont_pt -> pdc ) {
344344 ret_value -> cont_pt -> pdc -> local_id = info -> cont_pt -> pdc -> local_id ;
345345 if (info -> cont_pt -> pdc -> name )
@@ -366,7 +366,7 @@ PDCcont_get_info(const char *cont_name)
366366
367367 tmp = PDC_cont_get_info (cont_id );
368368
369- ret_value = PDC_CALLOC ( 1 , struct pdc_cont_info );
369+ ret_value = ( struct pdc_cont_info * ) PDC_calloc ( 1 , sizeof ( struct pdc_cont_info ) );
370370 if (!ret_value )
371371 PGOTO_ERROR (NULL , "cannot allocate memory" );
372372
@@ -440,7 +440,7 @@ PDCcont_iter_get_info(cont_handle *chandle)
440440 if (info == NULL )
441441 PGOTO_ERROR (NULL , "PDC container info memory allocation failed" );
442442
443- ret_value = PDC_CALLOC ( 1 , struct pdc_cont_info );
443+ ret_value = ( struct pdc_cont_info * ) PDC_calloc ( 1 , sizeof ( struct pdc_cont_info ) );
444444 if (!ret_value )
445445 PGOTO_ERROR (NULL , "failed to allocate memory" );
446446
0 commit comments