Eric Pouech : urlmon/tests: Don't use read as a global variable.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 15:17:51 CDT 2022
Module: wine
Branch: master
Commit: e83b91ddefea6643cca380d0e1f37813dca2c5e9
URL: https://gitlab.winehq.org/wine/wine/-/commit/e83b91ddefea6643cca380d0e1f37813dca2c5e9
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Wed Aug 3 09:52:06 2022 +0200
urlmon/tests: Don't use read as a global variable.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/urlmon/tests/url.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c
index 5e6792742ac..43a47609027 100644
--- a/dlls/urlmon/tests/url.c
+++ b/dlls/urlmon/tests/url.c
@@ -170,7 +170,7 @@ static const WCHAR emptyW[] = {0};
static BOOL stopped_binding = FALSE, stopped_obj_binding = FALSE, emulate_protocol = FALSE,
data_available = FALSE, http_is_first = TRUE, bind_to_object = FALSE, filedwl_api, post_test;
-static DWORD read = 0, bindf = 0, prot_state = 0, thread_id, tymed, security_problem;
+static DWORD nread = 0, bindf = 0, prot_state = 0, thread_id, tymed, security_problem;
static const WCHAR *reported_url;
static CHAR mime_type[512];
static IInternetProtocolSink *protocol_sink = NULL;
@@ -580,7 +580,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
CHECK_EXPECT(Start);
- read = 0;
+ nread = 0;
reported_url = szUrl;
if(!filedwl_api) /* FIXME */
@@ -1128,7 +1128,7 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv,
}else {
memset(pv, '?', cb);
*pcbRead = cb;
- read++;
+ nread++;
return S_OK;
}
case 3:
@@ -1150,7 +1150,7 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv,
}
}
- if(read) {
+ if(nread) {
*pcbRead = 0;
return S_FALSE;
}
@@ -1163,7 +1163,7 @@ static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv,
}
ok(*pcbRead == 0, "*pcbRead=%ld, expected 0\n", *pcbRead);
- read += *pcbRead = sizeof(data)-1;
+ nread += *pcbRead = sizeof(data)-1;
memcpy(pv, data, sizeof(data));
return S_OK;
}
More information about the wine-cvs
mailing list