fsutil: Initialize ret in hardlink() (Coverity).

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gijs Vermeulen 2020-08-17 18:59:10 +02:00 committed by Alexandre Julliard
parent a10824a03c
commit 5e300f0633
2 changed files with 7 additions and 1 deletions

View File

@ -97,7 +97,7 @@ static int create_hardlink(int argc, WCHAR *argv[])
static int hardlink(int argc, WCHAR *argv[])
{
int ret;
int ret = 0;
if (argc > 2)
{

View File

@ -63,6 +63,12 @@ static void test_hardlink(void)
ok(hfile != INVALID_HANDLE_VALUE, "failed to create a file\n");
CloseHandle(hfile);
rc = runcmd("fsutil");
ok(rc == 0, "failed to run fsutil\n");
rc = runcmd("fsutil hardlink");
ok(rc == 0, "failed to run fsutil hardlink\n");
rc = runcmd("fsutil hardlink create link file");
ok(rc == 0, "failed to create a hardlink\n");