Commit 889649cb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

streamOpenRead: fix bug if open failed

parent 66e8500a
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* gridPrint: print xfirst and xinc if xinc is constant * gridPrint: print xfirst and xinc if xinc is constant
* gridGenYvals: try to calculate non global gaussian latitides * gridGenYvals: try to calculate non global gaussian latitides
* add global int attr support * add global int attr support
* streamOpenRead: fix bug if open failed
* add function tableInqParCode * add function tableInqParCode
* Version 0.9.7 released * Version 0.9.7 released
......
...@@ -785,7 +785,7 @@ int streamOpenRead(const char *filename) ...@@ -785,7 +785,7 @@ int streamOpenRead(const char *filename)
streamID = streamOpen(filename, "r", filetype); streamID = streamOpen(filename, "r", filetype);
streams[streamID].byteorder = byteorder; if ( streamID >= 0 ) streams[streamID].byteorder = byteorder;
return (streamID); return (streamID);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#if defined (VERSION) #if defined (VERSION)
static const char cdi_libvers[] = VERSION " of "__DATE__" "__TIME__; static char cdi_libvers[] = VERSION " of "__DATE__" "__TIME__;
#else #else
# error "VERSION undefined" # error "VERSION undefined"
#endif #endif
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
extern "C" { extern "C" {
#endif #endif
const char *cdiLibraryVersion(void); char *cdiLibraryVersion(void);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
const char *cdiLibraryVersion(void) char *cdiLibraryVersion(void)
{ {
return (cdi_libvers); return (cdi_libvers);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment