From 0574cea7beb473a6353a940aef2cde7fe8848cf8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 24 Sep 2009 12:15:16 +0000 Subject: [PATCH] 2009-09-24 14:14 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmemio/memio.c * pacified warning --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbmemio/memio.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 290ccdf66b..fc8ce25d21 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-24 14:14 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmemio/memio.c + * pacified warning + 2009-09-24 13:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/itemapi.c * modified (optimized manually) hb_itemPutNLen() to not exploit bug diff --git a/harbour/contrib/hbmemio/memio.c b/harbour/contrib/hbmemio/memio.c index 6798e07bb9..f0ec1354ed 100644 --- a/harbour/contrib/hbmemio/memio.c +++ b/harbour/contrib/hbmemio/memio.c @@ -306,7 +306,7 @@ HB_MEMFS_EXPORT BOOL hb_memfsRename( const char * szName, const char * szNewName HB_MEMFS_EXPORT HB_FHANDLE hb_memfsOpen( const char * szName, USHORT uiFlags ) { - PHB_MEMFS_FILE pFile; + PHB_MEMFS_FILE pFile = NULL; ULONG ulPos; USHORT uiError = 0; @@ -381,7 +381,7 @@ HB_MEMFS_EXPORT HB_FHANDLE hb_memfsOpen( const char * szName, USHORT uiFlags ) } s_error = uiError; - if( uiError ) + if( !pFile ) { HB_MEMFSMT_UNLOCK return FS_ERROR;