Fix multiple compilation errors and memory leaks.
- Rename malloc_message() because it was causing a compilation error on FreeBSD. - Use correct type as a return from gzdopen(). - Memory allocation, header file includes, etc.
This commit is contained in:
@@ -42,6 +42,9 @@
|
||||
#ifdef HAVE_LIBZ
|
||||
#include <zlib.h>
|
||||
#endif /* HAVE_LIBZ */
|
||||
#ifdef HAVE_LIBBZ2
|
||||
#include <bzlib.h>
|
||||
#endif /* HAVE_LIBBZ2 */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -108,9 +111,9 @@ FILE *m_fdopen (int fildes, const char *mode)
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
|
||||
gzFile *m_gzdopen (int fildes, const char *mode)
|
||||
gzFile m_gzdopen (int fildes, const char *mode)
|
||||
{
|
||||
gzFile *blah;
|
||||
gzFile blah;
|
||||
|
||||
blah = gzdopen (fildes, mode);
|
||||
if (blah == NULL)
|
||||
|
||||
Reference in New Issue
Block a user