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
130c1fce
Commit
130c1fce
authored
Aug 16, 2015
by
Uwe Schulzweida
Browse files
zaxisDefVct: allow overwrite of vct
parent
44026768
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zaxis.c
View file @
130c1fce
...
...
@@ -1010,16 +1010,14 @@ void zaxisDefVct(int zaxisID, int size, const double *vct)
{
zaxis_t
*
zaxisptr
=
zaxisID2Ptr
(
zaxisID
);
if
(
zaxisptr
->
vct
==
0
)
if
(
zaxisptr
->
vct
==
0
||
zaxisptr
->
vctsize
!=
size
)
{
zaxisptr
->
vctsize
=
size
;
zaxisptr
->
vct
=
(
double
*
)
xmalloc
((
size_t
)
size
*
sizeof
(
double
));
memcpy
(
zaxisptr
->
vct
,
vct
,
(
size_t
)
size
*
sizeof
(
double
));
reshSetStatus
(
zaxisID
,
&
zaxisOps
,
RESH_DESYNC_IN_USE
);
zaxisptr
->
vct
=
(
double
*
)
realloc
(
zaxisptr
->
vct
,
(
size_t
)
size
*
sizeof
(
double
));
}
else
if
(
zaxisptr
->
vct
size
!=
size
)
Warning
(
"VCT was already defined"
);
memcpy
(
zaxisptr
->
vct
,
vct
,
(
size_t
)
size
*
sizeof
(
double
));
reshSetStatus
(
zaxisID
,
&
zaxisOps
,
RESH_DESYNC_IN_USE
);
}
...
...
Write
Preview
Supports
Markdown
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