diff --git a/src/proc/proc.c b/src/proc/proc.c index d81b1af911..d9c88b9482 100644 --- a/src/proc/proc.c +++ b/src/proc/proc.c @@ -170,12 +170,12 @@ ompi_proc_t * ompi_proc_find ( const ompi_process_name_t * name ) ** I just wanted to avoid duplicating data conversion code here... */ int ompi_proc_get_namebuf_by_proc ( ompi_proc_t **proclist, int proclistsize, - char **namebuf, size_t *namebuflen ) + char **namebuf, int *namebuflen ) { int i; ompi_process_name_t *nbuf=NULL; - nbuf = ( ompi_process_name_t *) calloc (proclistsize, sizeof(ompi_process_name_t)); + nbuf = (ompi_process_name_t *) calloc (proclistsize, sizeof(ompi_process_name_t)); if ( NULL == nbuf ) { return OMPI_ERR_OUT_OF_RESOURCE; } @@ -202,7 +202,7 @@ int ompi_proc_namebuf_returnbuf ( char *namebuf ) } -int ompi_proc_get_proclist (char *namebuf, size_t namebuflen, +int ompi_proc_get_proclist (char *namebuf, int namebuflen, int proclistsize, ompi_proc_t ***proclist) { int i; @@ -227,7 +227,7 @@ int ompi_proc_get_proclist (char *namebuf, size_t namebuflen, /* These two functions are at the moment trivial */ int ompi_proc_get_namebuf_by_name ( ompi_process_name_t **namelist, int namelistsize, - char **namebuf, size_t *namebuflen ) + char **namebuf, int *namebuflen ) { int i; ompi_process_name_t *nbuf=NULL; @@ -247,7 +247,7 @@ int ompi_proc_get_namebuf_by_name ( ompi_process_name_t **namelist, int namelist return OMPI_SUCCESS; } -int ompi_proc_get_namelist ( char *namebuf, size_t namebuflen, +int ompi_proc_get_namelist ( char *namebuf, int namebuflen, int namelistsize, ompi_process_name_t ***namelist ) { int i; diff --git a/src/proc/proc.h b/src/proc/proc.h index a16f78dd03..59d1d7db7d 100644 --- a/src/proc/proc.h +++ b/src/proc/proc.h @@ -87,7 +87,7 @@ ompi_proc_t * ompi_proc_find ( const ompi_process_name_t* name ); * OMPI_ERROR: other errors */ int ompi_proc_get_namebuf_by_proc ( ompi_proc_t **proclist, int proclistsize, - char **namebuf, size_t *namebuflen ); + char **namebuf, int *namebuflen ); /** * Since ompi_proc_get_namebuf_by_proc allocates the namebuf, we decided to @@ -121,7 +121,7 @@ int ompi_proc_namebuf_returnbuf ( char *namebuf ); * OMPI_ERROR else */ -int ompi_proc_get_proclist (char *namebuf, size_t namebuflen, +int ompi_proc_get_proclist (char *namebuf, int namebuflen, int proclistsize, ompi_proc_t ***proclist); /** @@ -131,13 +131,13 @@ int ompi_proc_get_proclist (char *namebuf, size_t namebuflen, */ int ompi_proc_get_namebuf_by_name ( ompi_process_name_t **namelist, int namelistsize, - char **namebuf, size_t *namebuflen ); + char **namebuf, int *namebuflen ); /** * similar to ompi_proc_get_proclist, returns however a list of * ompi_process_name_t pointers. */ -int ompi_proc_get_namelist ( char *namebuf, size_t namebuflen, +int ompi_proc_get_namelist ( char *namebuf, int namebuflen, int namelistlen, ompi_process_name_t ***namelist );