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
00606aa9
Commit
00606aa9
authored
Jul 06, 2012
by
Uwe Schulzweida
Browse files
fileOpen: check errno
parent
c6c88649
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cdi_error.c
View file @
00606aa9
...
...
@@ -15,8 +15,6 @@ char *cdiStringError(int cdiErrno)
static
char
_EUNC4
[]
=
"Unsupported netCDF4 structure"
;
static
char
_ELIMIT
[]
=
"Internal limits exceeded"
;
printf
(
"cdiErrno: %d
\n
"
,
cdiErrno
);
printf
(
"errno: %d
\n
"
,
errno
);
switch
(
cdiErrno
)
{
case
CDI_ESYSTEM
:
{
...
...
src/stream.c
View file @
00606aa9
...
...
@@ -615,6 +615,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case
FILETYPE_SRV
:
{
fileID
=
fileOpen
(
filename
,
filemode
);
if
(
fileID
<
0
)
fileID
=
CDI_ESYSTEM
;
record
=
(
Record
*
)
malloc
(
sizeof
(
Record
));
record
->
buffer
=
NULL
;
record
->
srvp
=
srvNew
();
...
...
@@ -625,6 +626,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case
FILETYPE_EXT
:
{
fileID
=
fileOpen
(
filename
,
filemode
);
if
(
fileID
<
0
)
fileID
=
CDI_ESYSTEM
;
record
=
(
Record
*
)
malloc
(
sizeof
(
Record
));
record
->
buffer
=
NULL
;
record
->
extp
=
extNew
();
...
...
@@ -635,6 +637,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case
FILETYPE_IEG
:
{
fileID
=
fileOpen
(
filename
,
filemode
);
if
(
fileID
<
0
)
fileID
=
CDI_ESYSTEM
;
record
=
(
Record
*
)
malloc
(
sizeof
(
Record
));
record
->
buffer
=
NULL
;
record
->
iegp
=
iegNew
();
...
...
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