From 0aecedf281a850b9886e7a7836dddde2e2206e5d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 24 Mar 2008 12:37:33 +0100 Subject: [PATCH] version: LZCopy return value is LONG. --- dlls/version/install.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/version/install.c b/dlls/version/install.c index 5ff25e7b38f..d3170e33939 100644 --- a/dlls/version/install.c +++ b/dlls/version/install.c @@ -367,7 +367,8 @@ DWORD WINAPI VerInstallFileA( LPCSTR pdest; char destfn[260],tmpfn[260],srcfn[260]; HFILE hfsrc,hfdst; - DWORD attr,ret,xret,tmplast; + DWORD attr,xret,tmplast; + LONG ret; LPBYTE buf1,buf2; OFSTRUCT ofs; @@ -419,30 +420,31 @@ DWORD WINAPI VerInstallFileA( } ret = LZCopy(hfsrc,hfdst); _lclose(hfdst); - if (((LONG)ret) < 0) { + if (ret < 0) { /* translate LZ errors into VIF_xxx */ switch (ret) { case LZERROR_BADINHANDLE: case LZERROR_READ: case LZERROR_BADVALUE: case LZERROR_UNKNOWNALG: - ret = VIF_CANNOTREADSRC; + xret = VIF_CANNOTREADSRC; break; case LZERROR_BADOUTHANDLE: case LZERROR_WRITE: - ret = VIF_OUTOFSPACE; + xret = VIF_OUTOFSPACE; break; case LZERROR_GLOBALLOC: case LZERROR_GLOBLOCK: - ret = VIF_OUTOFMEMORY; + xret = VIF_OUTOFMEMORY; break; default: /* unknown error, should not happen */ - ret = 0; + FIXME("Unknown LZCopy error %d, ignoring.\n", ret); + xret = 0; break; } - if (ret) { + if (xret) { LZClose(hfsrc); - return ret; + return xret; } } }