Commit 5a997381 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Check status of cdiInqKeyLen().

parent 5afd4621
......@@ -310,7 +310,7 @@ grid_print_kernel(int gridID, int opt, FILE *fp)
}
int length = 0;
if (cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
{
char reference_link[8192];
cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference_link, &length);
......
......@@ -262,7 +262,7 @@ referenceToGrid(int sourceGridID)
gridpath[0] = 0;
int length = 0;
if (cdiInqKeyLen(sourceGridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
if (CDI_NOERR == cdiInqKeyLen(sourceGridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
cdiInqKeyString(sourceGridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, griduri, &length);
if (griduri[0] == 0)
......
......@@ -375,7 +375,7 @@ printGridInfoKernel(int gridID, int index, int lproj)
if (number > 0) fprintf(stdout, "%33s : number=%d position=%d\n", "grid", number, position);
int length = 0;
if (cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
{
char reference_link[8192];
cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference_link, &length);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment