Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
071bcf51
Commit
071bcf51
authored
Nov 09, 2019
by
Uwe Schulzweida
Browse files
Added missing call to strlen().
parent
04f062b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zaxis.c
View file @
071bcf51
...
...
@@ -209,7 +209,7 @@ int zaxisCreate_(int zaxistype, int size, int id)
const
char
*
stdname
=
ZaxistypeEntry
[
zaxistype
].
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
;
...
...
@@ -1447,7 +1447,7 @@ void zaxisPrintKernel(zaxis_t *zaxisptr, FILE *fp)
string
=
cdiInqVarKeyString
(
&
zaxisptr
->
keys
,
CDI_KEY_LONGNAME
);
if
(
string
[
0
]
)
fprintf
(
fp
,
"longname = %s
\n
"
,
string
);
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment