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
b5b77be5
Commit
b5b77be5
authored
Mar 25, 2019
by
Uwe Schulzweida
Browse files
cdiVlistAddGridIfNew: check ngrids.
parent
66b601f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
b5b77be5
...
...
@@ -2385,13 +2385,13 @@ bool gridCompare(int gridID, const grid_t *grid, bool coord_compare)
else
if
(
grid
->
type
==
GRID_UNSTRUCTURED
)
{
/* FIXME: not octet 0 but octet 7 is guaranteed non-zero for any non-NULL UUID */
differ
|
=
((
gridRef
->
uuid
[
0
]
||
grid
->
uuid
[
0
])
&&
memcmp
(
gridRef
->
uuid
,
grid
->
uuid
,
CDI_UUID_SIZE
));
differ
=
((
gridRef
->
uuid
[
0
]
||
grid
->
uuid
[
0
])
&&
memcmp
(
gridRef
->
uuid
,
grid
->
uuid
,
CDI_UUID_SIZE
));
if
(
!
differ
)
{
if
(
coord_compare
)
{
differ
=
grid
->
nvertex
!=
gridRef
->
nvertex
||
(
grid
->
number
>
0
&&
grid
->
position
!=
gridRef
->
position
)
;
||
(
grid
->
number
>
0
&&
grid
->
position
!=
gridRef
->
position
)
||
gridRef
->
vtable
->
compareXYAO
((
grid_t
*
)
gridRef
,
(
grid_t
*
)
grid
);
}
else
...
...
@@ -5067,6 +5067,7 @@ struct addIfNewRes cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode)
}
if
(
mode
<
2
)
{
xassert
(
ngrids
<
MAX_GRIDS_PS
);
vlistptr
->
gridIDs
[
ngrids
]
=
gridID
;
vlistptr
->
ngrids
++
;
}
...
...
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