Commit 74845af0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Check status of cdiInqKeyLen().

parent f14d6226
......@@ -3387,7 +3387,7 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
}
int length;
if (cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
{
char reference_link[8192];
length = sizeof(reference_link);
......@@ -4021,7 +4021,7 @@ The function @func{gridInqReference} returns the reference URI to an unstructure
int gridInqReference(int gridID, char *reference)
{
int length = 0;
if (cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
if (CDI_NOERR == cdiInqKeyLen(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, &length))
{
if (reference)
cdiInqKeyString(gridID, CDI_GLOBAL, CDI_KEY_REFERENCEURI, reference, &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