winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2018
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
716 discussions
Start a n
N
ew thread
Dmitry Timoshkov : schedsvc: Read parameters and current directory from the job file.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: bfb0474e77b03be7dad9dbd18f804a47a63dc868 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfb0474e77b03be7dad9dbd1…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu May 31 12:20:46 2018 +0800 schedsvc: Read parameters and current directory from the job file. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/schedsvc/atsvc.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c index 542dfc3..05335de 100644 --- a/dlls/schedsvc/atsvc.c +++ b/dlls/schedsvc/atsvc.c @@ -59,6 +59,8 @@ struct job_t { struct list entry; WCHAR *name; + WCHAR *params; + WCHAR *curdir; AT_ENUM info; FIXDLEN_DATA data; USHORT instance_count; @@ -76,7 +78,7 @@ static CRITICAL_SECTION_DEBUG cs_debug = }; static CRITICAL_SECTION at_job_list_section = { &cs_debug, -1, 0, 0, 0, 0 }; -static DWORD load_unicode_strings(const char *data, DWORD limit, AT_ENUM *info) +static DWORD load_unicode_strings(const char *data, DWORD limit, struct job_t *job) { DWORD i, data_size = 0; USHORT len; @@ -101,8 +103,23 @@ static DWORD load_unicode_strings(const char *data, DWORD limit, AT_ENUM *info) TRACE("string %u: %s\n", i, wine_dbgstr_wn((const WCHAR *)data, len)); - if (i == 0) - info->Command = heap_strdupW((const WCHAR *)data); + switch (i) + { + case 0: + job->info.Command = heap_strdupW((const WCHAR *)data); + break; + + case 1: + job->params = heap_strdupW((const WCHAR *)data); + break; + + case 2: + job->curdir = heap_strdupW((const WCHAR *)data); + break; + + default: + break; + } data += len * sizeof(WCHAR); data_size += len * sizeof(WCHAR); @@ -162,7 +179,7 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info) TRACE("instance count %u\n", info->instance_count); if (fixed->name_size_offset + sizeof(USHORT) < size) - unicode_strings_size = load_unicode_strings(data + fixed->name_size_offset, size - fixed->name_size_offset, &info->info); + unicode_strings_size = load_unicode_strings(data + fixed->name_size_offset, size - fixed->name_size_offset, info); else { TRACE("invalid name_size_offset\n"); @@ -324,6 +341,8 @@ static void free_job(struct job_t *job) { free_job_info(&job->info); heap_free(job->name); + heap_free(job->params); + heap_free(job->curdir); heap_free(job); }
1
0
0
0
Dmitry Timoshkov : mstask: Implement ITask::GetMostRecentRunTime().
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 5f895673dfa80e4a34fd7c65f5e3505888f4a7f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f895673dfa80e4a34fd7c65…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu May 31 12:20:14 2018 +0800 mstask: Implement ITask::GetMostRecentRunTime(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 58be83e..91d2cb6 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -63,6 +63,7 @@ typedef struct HRESULT status; WORD idle_minutes, deadline_minutes; DWORD flags, priority, maxRunTime, exit_code; + SYSTEMTIME last_runtime; LPWSTR accountName; DWORD trigger_count; TASK_TRIGGER *trigger; @@ -654,10 +655,18 @@ static HRESULT WINAPI MSTASK_ITask_EditWorkItem( static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime(ITask *iface, SYSTEMTIME *st) { - FIXME("(%p, %p): stub\n", iface, st); + TaskImpl *This = impl_from_ITask(iface); + + TRACE("(%p, %p)\n", iface, st); + + if (This->status == SCHED_S_TASK_NOT_SCHEDULED) + { + memset(st, 0, sizeof(*st)); + return SCHED_S_TASK_HAS_NOT_RUN; + } - memset(st, 0, sizeof(*st)); - return SCHED_S_TASK_HAS_NOT_RUN; + *st = This->last_runtime; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_GetStatus(ITask *iface, HRESULT *status) @@ -1262,8 +1271,9 @@ static HRESULT load_job_data(TaskImpl *This, BYTE *data, DWORD size) This->status = fixed->status; TRACE("flags %08x\n", fixed->flags); This->flags = fixed->flags; + This->last_runtime = fixed->last_runtime; st = &fixed->last_runtime; - TRACE("last_runtime %d/%d/%d wday %d %d:%d:%d.%03d\n", + TRACE("last_runtime %u/%u/%u wday %u %u:%02u:%02u.%03u\n", st->wDay, st->wMonth, st->wYear, st->wDayOfWeek, st->wHour, st->wMinute, st->wSecond, st->wMilliseconds); @@ -1617,7 +1627,7 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta This->status = SCHED_S_TASK_HAS_NOT_RUN; fixed.status = This->status; fixed.flags = This->flags; - memset(&fixed.last_runtime, 0, sizeof(fixed.last_runtime)); + fixed.last_runtime = This->last_runtime; try = 1; for (;;) @@ -1855,6 +1865,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task) This->is_dirty = FALSE; This->instance_count = 0; + memset(&This->last_runtime, 0, sizeof(This->last_runtime)); CoCreateGuid(&This->uuid); /* Default time is 3 days = 259200000 ms */
1
0
0
0
Michael Stefaniuc : xaudio2/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 8226f877d98135d3f03825fe6d083130ebb5f393 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8226f877d98135d3f03825fe…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 01:15:33 2018 +0200 xaudio2/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xaudio2_7/tests/xaudio2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index ccc415a..6609753 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -1004,7 +1004,7 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version) } if(pCreateFX){ - for(i = 0; i < sizeof(const_clsids) / sizeof(*const_clsids); ++i){ + for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){ hr = pCreateFX(const_clsids[i].clsid, &fx_unk); todo_wine_if(const_clsids[i].todo) ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr); @@ -1090,7 +1090,7 @@ static void test_xapo_creation_modern(const char *module) } if(pCreateFX){ - for(i = 0; i < sizeof(const_clsids) / sizeof(*const_clsids); ++i){ + for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){ hr = pCreateFX(const_clsids[i].clsid, &fx_unk, NULL, 0); todo_wine_if(const_clsids[i].todo) ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr);
1
0
0
0
Michael Stefaniuc : d3dx10/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: c64185214f8dae75c8734d1817fbad5b85f70c98 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c64185214f8dae75c8734d18…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 01:15:27 2018 +0200 d3dx10/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx10_43/tests/d3dx10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 9c84a76..2bf92cd 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -269,8 +269,8 @@ float4 main(float4 color : COLOR) : SV_TARGET hr = ID3D10Device_CreatePixelShader(device, simple_ps, sizeof(simple_ps), &ps); ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); - hr = ID3D10Device_CreateInputLayout(device, layout_desc, sizeof(layout_desc) / sizeof(*layout_desc), - simple_vs, sizeof(simple_vs), &input_layout); + hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), simple_vs, + sizeof(simple_vs), &input_layout); ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); blend_desc.AlphaToCoverageEnable = FALSE;
1
0
0
0
Michael Stefaniuc : rsaenh/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 9b0ed6bc315ff8b0a790b2c36f220d97cc428778 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b0ed6bc315ff8b0a790b2c3…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:49 2018 +0200 rsaenh/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rsaenh/tests/rsaenh.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index bc8e798..df31aeb 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -1815,7 +1815,7 @@ static void test_hmac(void) { 0xcf, 0x10, 0x6b, 0xb6, 0x7d, 0x0f, 0x13, 0x32 }; int i; - for (i=0; i<sizeof(abData)/sizeof(BYTE); i++) abData[i] = (BYTE)i; + for (i=0; i < ARRAY_SIZE(abData); i++) abData[i] = (BYTE)i; if (!derive_key(CALG_RC2, &hKey, 56)) return; @@ -1829,7 +1829,7 @@ static void test_hmac(void) { result = CryptHashData(hHash, abData, sizeof(abData), 0); ok(result, "%08x\n", GetLastError()); - dwLen = sizeof(abData)/sizeof(BYTE); + dwLen = ARRAY_SIZE(abData); result = CryptGetHashParam(hHash, HP_HASHVAL, abData, &dwLen, 0); ok(result, "%08x\n", GetLastError()); @@ -1855,8 +1855,8 @@ static void test_mac(void) { static const BYTE mac_40[8] = { 0xb7, 0xa2, 0x46, 0xe9, 0x11, 0x31, 0xe0, 0xad}; int i; - for (i=0; i<sizeof(abData)/sizeof(BYTE); i++) abData[i] = (BYTE)i; - for (i=0; i<sizeof(abData)/sizeof(BYTE); i++) abEnc[i] = (BYTE)i; + for (i=0; i < ARRAY_SIZE(abData); i++) abData[i] = (BYTE)i; + for (i=0; i < ARRAY_SIZE(abData); i++) abEnc[i] = (BYTE)i; if (!derive_key(CALG_RC2, &hKey, 40)) return; @@ -1871,7 +1871,7 @@ static void test_mac(void) { result = CryptHashData(hHash, abData, sizeof(abData), 0); ok(result, "%08x\n", GetLastError()); - dwLen = sizeof(abData)/sizeof(BYTE); + dwLen = ARRAY_SIZE(abData); result = CryptGetHashParam(hHash, HP_HASHVAL, abData, &dwLen, 0); ok(result && dwLen == 8, "%08x, dwLen: %d\n", GetLastError(), dwLen); @@ -2725,7 +2725,7 @@ static void test_import_hmac(void) }; DWORD i; - for (i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) + for (i = 0; i < ARRAY_SIZE(cases); i++) { const struct rfc2202_test_case *test_case = &cases[i]; DWORD size = sizeof(BLOBHEADER) + sizeof(DWORD) + test_case->key_len; @@ -3822,13 +3822,13 @@ static void test_key_derivation(const char *prov) }, }; /* Due to differences between encryption from <= 2000 and >= XP some tests need to be skipped */ - int old_broken[sizeof(tests)/sizeof(tests[0])]; + int old_broken[ARRAY_SIZE(tests)]; memset(old_broken, 0, sizeof(old_broken)); old_broken[3] = old_broken[4] = old_broken[15] = old_broken[16] = 1; old_broken[27] = old_broken[28] = old_broken[39] = old_broken[40] = 1; uniquecontainer(NULL); - for (i=0; i<sizeof(tests)/sizeof(tests[0]); i++) + for (i=0; i < ARRAY_SIZE(tests); i++) { if (win2k && old_broken[i]) continue; @@ -3886,7 +3886,7 @@ err: START_TEST(rsaenh) { - for (iProv = 0; iProv < sizeof(szProviders) / sizeof(szProviders[0]); iProv++) + for (iProv = 0; iProv < ARRAY_SIZE(szProviders); iProv++) { if (!init_base_environment(szProviders[iProv], 0)) continue;
1
0
0
0
Michael Stefaniuc : schedsvc/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 30d732ae4045bdeee49915e35df79f614a546503 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=30d732ae4045bdeee49915e3…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:48 2018 +0200 schedsvc/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/schedsvc/tests/rpcapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/schedsvc/tests/rpcapi.c b/dlls/schedsvc/tests/rpcapi.c index a383538..4aaafb6 100644 --- a/dlls/schedsvc/tests/rpcapi.c +++ b/dlls/schedsvc/tests/rpcapi.c @@ -159,7 +159,7 @@ START_TEST(rpcapi) hr = SchRpcCreateFolder(Wine, NULL, 0); ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); + MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW)); path = NULL; info = NULL; @@ -168,7 +168,7 @@ START_TEST(rpcapi) ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info); - for (i = 0; i < sizeof(create_new_task)/sizeof(create_new_task[0]); i++) + for (i = 0; i < ARRAY_SIZE(create_new_task); i++) { path = NULL; info = NULL; @@ -207,7 +207,7 @@ START_TEST(rpcapi) ok(!info, "expected NULL, info %p\n", info); MIDL_user_free(path); - for (i = 0; i < sizeof(open_existing_task)/sizeof(open_existing_task[0]); i++) + for (i = 0; i < ARRAY_SIZE(open_existing_task); i++) { path = NULL; info = NULL;
1
0
0
0
Michael Stefaniuc : scrrun/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 0c8c2bdd211c3ac9c5398fed92bd2a4d291d7a09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0c8c2bdd211c3ac9c5398fed…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:47 2018 +0200 scrrun/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrrun/tests/dictionary.c | 6 +++--- dlls/scrrun/tests/filesystem.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/scrrun/tests/dictionary.c b/dlls/scrrun/tests/dictionary.c index 658dd66..cda288b 100644 --- a/dlls/scrrun/tests/dictionary.c +++ b/dlls/scrrun/tests/dictionary.c @@ -368,7 +368,7 @@ static void test_hash_value(void) ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); ok(V_I4(&hash) == 0, "got %d\n", V_I4(&hash)); - for (i = 0; i < sizeof(str_hash_tests)/sizeof(str_hash_tests[0]); i++) { + for (i = 0; i < ARRAY_SIZE(str_hash_tests); i++) { expected = get_str_hash(str_hash_tests[i], BinaryCompare); hr = IDictionary_put_CompareMode(dict, BinaryCompare); @@ -461,7 +461,7 @@ static void test_hash_value(void) ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); - for (i = 0; i < sizeof(int_hash_tests)/sizeof(int_hash_tests[0]); i++) { + for (i = 0; i < ARRAY_SIZE(int_hash_tests); i++) { SHORT i2; BYTE ui1; LONG i4; @@ -597,7 +597,7 @@ static void test_hash_value(void) ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash)); - for (i = 0; i < sizeof(float_hash_tests)/sizeof(float_hash_tests[0]); i++) { + for (i = 0; i < ARRAY_SIZE(float_hash_tests); i++) { double dbl; FLOAT flt; DATE date; diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index d0c448c..29ee73f 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -375,7 +375,7 @@ static void test_GetFileVersion(void) BSTR path, version; HRESULT hr; - GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW)); lstrcpyW(filenameW, pathW); lstrcatW(filenameW, k32W); @@ -438,7 +438,7 @@ static void test_GetParentFolderName(void) hr = IFileSystem3_GetParentFolderName(fs3, NULL, NULL); ok(hr == E_POINTER, "GetParentFolderName returned %x, expected E_POINTER\n", hr); - for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { + for(i=0; i < ARRAY_SIZE(tests); i++) { result = (BSTR)0xdeadbeef; path = tests[i].path ? SysAllocString(tests[i].path) : NULL; hr = IFileSystem3_GetParentFolderName(fs3, path, &result); @@ -481,7 +481,7 @@ static void test_GetFileName(void) hr = IFileSystem3_GetFileName(fs3, NULL, NULL); ok(hr == E_POINTER, "GetFileName returned %x, expected E_POINTER\n", hr); - for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { + for(i=0; i < ARRAY_SIZE(tests); i++) { result = (BSTR)0xdeadbeef; path = tests[i].path ? SysAllocString(tests[i].path) : NULL; hr = IFileSystem3_GetFileName(fs3, path, &result); @@ -527,7 +527,7 @@ static void test_GetBaseName(void) hr = IFileSystem3_GetBaseName(fs3, NULL, NULL); ok(hr == E_POINTER, "GetBaseName returned %x, expected E_POINTER\n", hr); - for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { + for(i=0; i < ARRAY_SIZE(tests); i++) { result = (BSTR)0xdeadbeef; path = tests[i].path ? SysAllocString(tests[i].path) : NULL; hr = IFileSystem3_GetBaseName(fs3, path, &result); @@ -1521,7 +1521,7 @@ static void test_CreateTextFile(void) /* File was created in Unicode mode, it contains 0xfffe BOM. Opening it in non-Unicode mode treats BOM like a valuable data with appropriate CP_ACP -> WCHAR conversion. */ buffW[0] = 0; - MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW)); hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -1569,7 +1569,7 @@ static void test_WriteLine(void) ret = ReadFile(file, buffA, sizeof(buffA), &r, NULL); ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError()); - len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, sizeof(buffW)/sizeof(WCHAR)); + len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, ARRAY_SIZE(buffW)); buffW[len] = 0; lstrcpyW(buff2W, nameW); lstrcatW(buff2W, crlfW); @@ -1655,7 +1655,7 @@ static void test_ReadAll(void) hr = ITextStream_ReadAll(stream, &str); ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); buffW[0] = 0; - MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW)); ok(str[0] == buffW[0] && str[1] == buffW[1], "got %s, %d\n", wine_dbgstr_w(str), SysStringLen(str)); SysFreeString(str); ITextStream_Release(stream); @@ -1801,7 +1801,7 @@ static void test_Read(void) ok(hr == S_OK, "got 0x%08x\n", hr); buffW[0] = 0; - MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW)); ok(!lstrcmpW(str, buffW), "got %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(buffW)); ok(SysStringLen(str) == 2, "got %d\n", SysStringLen(str)); @@ -2151,7 +2151,7 @@ static void test_GetExtensionName(void) HRESULT hr; int i; - for (i = 0; i < sizeof(extension_tests)/sizeof(extension_tests[0]); i++) { + for (i = 0; i < ARRAY_SIZE(extension_tests); i++) { path = SysAllocString(extension_tests[i].path); ext = NULL; @@ -2190,7 +2190,7 @@ static void test_GetSpecialFolder(void) ok(hr == S_OK, "got 0x%08x\n", hr); hr = IFolder_get_Path(folder, &path); ok(hr == S_OK, "got 0x%08x\n", hr); - GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW)); ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW)); SysFreeString(path); IFolder_Release(folder); @@ -2199,7 +2199,7 @@ static void test_GetSpecialFolder(void) ok(hr == S_OK, "got 0x%08x\n", hr); hr = IFolder_get_Path(folder, &path); ok(hr == S_OK, "got 0x%08x\n", hr); - GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW)); ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW)); SysFreeString(path); IFolder_Release(folder); @@ -2208,7 +2208,7 @@ static void test_GetSpecialFolder(void) ok(hr == S_OK, "got 0x%08x\n", hr); hr = IFolder_get_Path(folder, &path); ok(hr == S_OK, "got 0x%08x\n", hr); - ret = GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + ret = GetTempPathW(ARRAY_SIZE(pathW), pathW); if (ret && pathW[ret-1] == '\\') pathW[ret-1] = 0;
1
0
0
0
Michael Stefaniuc : secure32/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 323198df10c7f24d01feb0d84d90fe1dcb6aca07 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=323198df10c7f24d01feb0d8…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:46 2018 +0200 secure32/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/tests/ntlm.c | 6 +++--- dlls/secur32/tests/secur32.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index b9fdf6f..6b1249d 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -1165,7 +1165,7 @@ static void testSignSeal(void) trace("Testing with more than one buffer.\n"); - crypt.cBuffers = sizeof(complex_data)/sizeof(complex_data[0]); + crypt.cBuffers = ARRAY_SIZE(complex_data); crypt.pBuffers = complex_data; complex_data[0].BufferType = SECBUFFER_DATA|SECBUFFER_READONLY_WITH_CHECKSUM; @@ -1436,7 +1436,7 @@ static void test_cred_multiple_use(void) getSecError(ret)); buffer_desc.ulVersion = SECBUFFER_VERSION; - buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]); + buffer_desc.cBuffers = ARRAY_SIZE(buffers); buffer_desc.pBuffers = buffers; ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION, @@ -1487,7 +1487,7 @@ static void test_null_auth_data(void) buffers[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, buffers[0].cbBuffer); buffer_desc.ulVersion = SECBUFFER_VERSION; - buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]); + buffer_desc.cBuffers = ARRAY_SIZE(buffers); buffer_desc.pBuffers = buffers; size = sizeof(user); diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c index 40c272a..2d2c2a6 100644 --- a/dlls/secur32/tests/secur32.c +++ b/dlls/secur32/tests/secur32.c @@ -67,7 +67,7 @@ static void testGetComputerObjectNameA(void) BOOLEAN rc; UINT i; - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { + for (i = 0; i < ARRAY_SIZE(formats); i++) { size = 0; SetLastError(0xdeadbeef); rc = pGetComputerObjectNameA(formats[i], NULL, &size); @@ -112,7 +112,7 @@ static void testGetComputerObjectNameW(void) BOOLEAN rc; UINT i; - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { + for (i = 0; i < ARRAY_SIZE(formats); i++) { size = 0; SetLastError(0xdeadbeef); rc = pGetComputerObjectNameW(formats[i], NULL, &size); @@ -134,7 +134,7 @@ static void testGetComputerObjectNameW(void) if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) continue; - size = sizeof(nameW)/sizeof(nameW[0]); + size = ARRAY_SIZE(nameW); SetLastError(0xdeadbeef); rc = pGetComputerObjectNameW(formats[i], nameW, &size); switch (formats[i]) @@ -158,7 +158,7 @@ static void testGetUserNameExA(void) BOOLEAN rc; UINT i; - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { + for (i = 0; i < ARRAY_SIZE(formats); i++) { size = sizeof(name); ZeroMemory(name, sizeof(name)); rc = pGetUserNameExA(formats[i], name, &size); @@ -205,7 +205,7 @@ static void testGetUserNameExW(void) BOOLEAN rc; UINT i; - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { + for (i = 0; i < ARRAY_SIZE(formats); i++) { size = sizeof(nameW); ZeroMemory(nameW, sizeof(nameW)); rc = pGetUserNameExW(formats[i], nameW, &size);
1
0
0
0
Michael Stefaniuc : serialui/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: 5085f4f9c1bab77495c4d428ec76530d45452863 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5085f4f9c1bab77495c4d428…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:45 2018 +0200 serialui/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/serialui/tests/confdlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/serialui/tests/confdlg.c b/dlls/serialui/tests/confdlg.c index 4606a75..bd541cd 100644 --- a/dlls/serialui/tests/confdlg.c +++ b/dlls/serialui/tests/confdlg.c @@ -165,7 +165,7 @@ static void test_drvCommConfigDialogW(void) /* test ports "com1" - "com4" */ for (i = 1; i < 5 ; i++) { sprintf(bufferA, fmt_comA, i); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); + MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW)); len = sizeof(pCC); ZeroMemory(pCC, sizeof(pCC)); SetLastError(0xdeadbeef); @@ -346,7 +346,7 @@ static void test_drvGetDefaultCommConfigW(void) /* test ports "com0" - "com10" */ for (i = 0; i < 11 ; i++) { sprintf(bufferA, fmt_comA, i); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); + MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW)); len = sizeof(pCC); ZeroMemory(pCC, sizeof(pCC)); SetLastError(0xdeadbeef);
1
0
0
0
Michael Stefaniuc : snmpapi/tests: Use the available ARRAY_SIZE() macro.
by Alexandre Julliard
31 May '18
31 May '18
Module: wine Branch: master Commit: a49b28cc77e2512c80af380ab9496afa8edc24e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a49b28cc77e2512c80af380a…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 30 21:15:43 2018 +0200 snmpapi/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/snmpapi/tests/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/snmpapi/tests/util.c b/dlls/snmpapi/tests/util.c index 0c517c1..0eb8816 100644 --- a/dlls/snmpapi/tests/util.c +++ b/dlls/snmpapi/tests/util.c @@ -211,7 +211,7 @@ static void test_SnmpUtilOidCpyFree(void) { INT ret; static UINT ids[] = { 1, 3, 6, 1, 4, 1, 311 }; - static AsnObjectIdentifier dst, src = { sizeof(ids) / sizeof(ids[0]), ids }; + static AsnObjectIdentifier dst, src = { ARRAY_SIZE(ids), ids }; /* These crashes under win98 */ if(0)
1
0
0
0
← Newer
1
2
3
4
5
6
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200