Skip to content

Commit

Permalink
Remove fprintf, set errno instead.
Browse files Browse the repository at this point in the history
Remove the fprintf statements in the windows platform implementation of
the POSIX opendir function, and set errno with the error value instead.

Closes: AXIS2c-1674
  • Loading branch information
bblough committed Sep 2, 2020
1 parent 8386b12 commit 5d48db7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util/src/platforms/windows/dir_windows.c
Expand Up @@ -51,15 +51,14 @@ axis2_opendir(
if (dwErr == ERROR_FILE_NOT_FOUND || dwErr == ERROR_PATH_NOT_FOUND
|| dwErr == ERROR_NO_MORE_FILES || dwErr == ERROR_NOT_READY)
{
fprintf(stderr, "FindFirstFile with unexpected result. Error code: %u\r\n", dwErr);

errno = dwErr;
dirp->finished = 1;
}
else
{
free(dirp);
free(filespec);
fprintf(stderr, "FindFirstFile failed. Error code: %u\r\n", dwErr);
errno = dwErr;
return NULL;
}
}
Expand Down

0 comments on commit 5d48db7

Please sign in to comment.