https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f440355da10c594bcc1f…
commit 8f440355da10c594bcc1fbae6331ad9da8fcbb99
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Fri Jul 27 21:54:12 2018 +0200
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Fri Jul 27 21:54:12 2018 +0200
[ROSDDT] do_update_base(): Fix assignment to f (#702)
Thanks to "devpao" for reporting this.
ROSAPPS-343
---
modules/rosapps/applications/sysutils/rosddt/rosddt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/rosapps/applications/sysutils/rosddt/rosddt.c
b/modules/rosapps/applications/sysutils/rosddt/rosddt.c
index 7e06fc9834..d64fdd23b0 100644
--- a/modules/rosapps/applications/sysutils/rosddt/rosddt.c
+++ b/modules/rosapps/applications/sysutils/rosddt/rosddt.c
@@ -146,7 +146,7 @@ static void do_update_base()
wchar_t up_url[MAX_PATH];
void *data = NULL;
u_long size;
- FILE *f = NULL;
+ FILE *f;
if (GetPrivateProfileString(L"URL", L"udpate", NULL, up_url,
MAX_PATH, gl_ini_file) == 0) {
wprintf(L"Update URL not found in rosddt.ini\n"); return;
@@ -156,7 +156,8 @@ static void do_update_base()
if (data == http_get(up_url, &size))
{
- if (f == _wfopen(gl_ini_file, L"wb")) {
+ f = _wfopen(gl_ini_file, L"wb");
+ if (f) {
fwrite(data, 1, size, f);
fclose(f);
wprintf(L"Update completed\n");