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
502ce990
Commit
502ce990
authored
Dec 08, 2014
by
Thomas Jahns
🤸
Browse files
Simplify accessor cdiDefAccesstype.
parent
6c3e1753
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream.c
View file @
502ce990
...
...
@@ -2103,24 +2103,15 @@ int streamInqFileID(int streamID)
void
cdiDefAccesstype
(
int
streamID
,
int
type
)
{
stream_t
*
streamptr
;
streamptr
=
(
stream_t
*
)
reshGetVal
(
streamID
,
&
streamOps
);
stream_t
*
streamptr
=
reshGetVal
(
streamID
,
&
streamOps
);
if
(
streamptr
->
accesstype
==
CDI_UNDEFID
)
{
streamptr
->
accesstype
=
type
;
}
else
{
if
(
streamptr
->
accesstype
!=
type
)
{
if
(
streamptr
->
accesstype
==
TYPE_REC
)
Error
(
"Changing access type from REC to VAR not allowed!"
);
else
Error
(
"Changing access type from VAR to REC not allowed!"
);
}
}
else
if
(
streamptr
->
accesstype
!=
type
)
Error
(
"Changing access type from %s not allowed!"
,
streamptr
->
accesstype
==
TYPE_REC
?
"REC to VAR"
:
"VAR to REC"
);
}
...
...
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