Commit 071bcf51 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added missing call to strlen().

parent 04f062b6
...@@ -209,7 +209,7 @@ int zaxisCreate_(int zaxistype, int size, int id) ...@@ -209,7 +209,7 @@ int zaxisCreate_(int zaxistype, int size, int id)
const char *stdname = ZaxistypeEntry[zaxistype].stdname; const char *stdname = ZaxistypeEntry[zaxistype].stdname;
if ( *stdname ) if ( *stdname )
cdiDefVarKeyBytes(&zaxisptr->keys, CDI_KEY_STDNAME, (const unsigned char*)stdname, (int)stdname+1); cdiDefVarKeyBytes(&zaxisptr->keys, CDI_KEY_STDNAME, (const unsigned char*)stdname, (int)strlen(stdname)+1);
zaxisptr->positive = ZaxistypeEntry[zaxistype].positive; zaxisptr->positive = ZaxistypeEntry[zaxistype].positive;
...@@ -1447,7 +1447,7 @@ void zaxisPrintKernel(zaxis_t *zaxisptr, FILE *fp) ...@@ -1447,7 +1447,7 @@ void zaxisPrintKernel(zaxis_t *zaxisptr, FILE *fp)
string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_LONGNAME); string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_LONGNAME);
if ( string[0] ) fprintf(fp, "longname = %s\n", string); if ( string[0] ) fprintf(fp, "longname = %s\n", string);
string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_UNITS); string = cdiInqVarKeyString(&zaxisptr->keys, CDI_KEY_UNITS);
if ( string[0] ) fprintf(fp, "units = %s\n", string); if ( string[0] ) fprintf(fp, "units = %s\n", string);
if ( zaxisptr->vals ) if ( zaxisptr->vals )
{ {
......
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