Skip to content
GitLab
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
8cdd6a63
Commit
8cdd6a63
authored
Sep 18, 2013
by
Uwe Schulzweida
Browse files
stream_cdf.c::cdfInqContents: changed memcmp to strncmp
parent
8ea5164b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf.c
View file @
8cdd6a63
...
...
@@ -5292,11 +5292,11 @@ void verify_coordinate_vars_1(int ndims, ncdim_t *ncdims, ncvar_t *ncvars, int t
{
if
(
strcmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at layer midpoints"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID
;
else
if
(
mem
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at midpoints"
,
25
)
==
0
)
else
if
(
strn
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at midpoints"
,
25
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID
;
else
if
(
strcmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at layer interfaces"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID_HALF
;
else
if
(
mem
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at interfaces"
,
26
)
==
0
)
else
if
(
strn
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at interfaces"
,
26
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID_HALF
;
else
if
(
strcmp
(
ncvars
[
ncvarid
].
units
,
"level"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_GENERIC
;
...
...
@@ -5371,11 +5371,11 @@ void verify_coordinate_vars_2(int nvars, ncvar_t *ncvars)
{
if
(
strcmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at layer midpoints"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID
;
else
if
(
mem
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at midpoints"
,
25
)
==
0
)
else
if
(
strn
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at midpoints"
,
25
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID
;
else
if
(
strcmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at layer interfaces"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID_HALF
;
else
if
(
mem
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at interfaces"
,
26
)
==
0
)
else
if
(
strn
cmp
(
ncvars
[
ncvarid
].
longname
,
"hybrid level at interfaces"
,
26
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_HYBRID_HALF
;
else
if
(
strcmp
(
ncvars
[
ncvarid
].
units
,
"level"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_GENERIC
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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