Skip to content

Commit 0a503cc

Browse files
Since PDCinit returns a uint64_t, 0 should indicate failure (#233)
Co-authored-by: Jean Luca Bez <jlbez@lbl.gov>
1 parent aa69dd6 commit 0a503cc

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
- Input:
6969
+ pdc_name is the reference for PDC class. Recommended use "pdc"
7070
- Output:
71-
+ PDC class ID used for future reference.
71+
+ PDC class ID used for future reference or 0 on failure.
7272
- All PDC client applications must call PDCinit before using it. This function will setup connections from clients to servers. A valid PDC server must be running.
7373
- For developers: currently implemented in pdc.c.
7474
+ perr_t PDCclose(pdcid_t pdcid)

src/api/include/pdc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int PDC_timing_report(const char *prefix);
5050
*
5151
* \param pdc_name [IN] Name of the PDC
5252
*
53-
* \return PDC id on success / -1 on failure
53+
* \return PDC id on success / 0 on failure
5454
*/
5555
pdcid_t PDCinit(const char *pdc_name);
5656

src/api/pdc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,22 @@ PDCinit(const char *pdc_name)
9090
FUNC_ENTER(NULL);
9191

9292
if (NULL == (pdc_id_list_g = (struct pdc_id_list *)PDC_calloc(1, sizeof(struct pdc_id_list))))
93-
PGOTO_ERROR(FAIL, "PDC global id list: memory allocation failed");
93+
PGOTO_ERROR(0, "PDC global id list: memory allocation failed");
9494

9595
if (PDC_class_init() < 0)
96-
PGOTO_ERROR(FAIL, "PDC class init error");
96+
PGOTO_ERROR(0, "PDC class init error");
9797
pdcid = PDC_class_create(pdc_name);
9898

9999
if (PDC_prop_init() < 0)
100-
PGOTO_ERROR(FAIL, "PDC property init error");
100+
PGOTO_ERROR(0, "PDC property init error");
101101
if (PDC_cont_init() < 0)
102-
PGOTO_ERROR(FAIL, "PDC container init error");
102+
PGOTO_ERROR(0, "PDC container init error");
103103
if (PDC_obj_init() < 0)
104-
PGOTO_ERROR(FAIL, "PDC object init error");
104+
PGOTO_ERROR(0, "PDC object init error");
105105
if (PDC_region_init() < 0)
106-
PGOTO_ERROR(FAIL, "PDC region init error");
106+
PGOTO_ERROR(0, "PDC region init error");
107107
if (PDC_transfer_request_init() < 0)
108-
PGOTO_ERROR(FAIL, "PDC region transfer init error");
108+
PGOTO_ERROR(0, "PDC region transfer init error");
109109

110110
// PDC Client Server connection init
111111
PDC_Client_init();

0 commit comments

Comments
 (0)