Skip to content
Snippets Groups Projects
Commit 12fbe313 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Fixed LZCopy return value check.

parent 17c8b8e2
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@
int main(int argc, char *argv[])
{
OFSTRUCT SourceOpenStruct1, SourceOpenStruct2;
DWORD dwreturn;
LONG ret;
HFILE hSourceFile, hDestFile;
if (argc < 2)
......@@ -43,10 +43,9 @@ int main(int argc, char *argv[])
GetExpandedName(argv[1], OriginalName);
hDestFile = LZOpenFile(OriginalName, &SourceOpenStruct2, OF_CREATE | OF_WRITE);
}
dwreturn = LZCopy(hSourceFile, hDestFile);
if (dwreturn != 0)
fprintf(stderr,"LZCopy failed: return is %ld\n",dwreturn);
ret = LZCopy(hSourceFile, hDestFile);
LZClose(hSourceFile);
LZClose(hDestFile);
return dwreturn;
if (ret <= 0) fprintf(stderr,"LZCopy failed: return is %ld\n",ret);
return (ret <= 0);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment