Commit c4fdcf3e authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound: Use the ARRAY_SIZE() macro.

parent f26168e4
......@@ -85,7 +85,7 @@ static void _dump_DSCAPS(DWORD xmask) {
};
unsigned int i;
for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
for (i = 0; i < ARRAY_SIZE(flags); i++)
if ((flags[i].mask & xmask) == flags[i].mask)
TRACE("%s ",flags[i].name);
}
......@@ -113,7 +113,7 @@ static void _dump_DSBCAPS(DWORD xmask) {
};
unsigned int i;
for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
for (i = 0; i < ARRAY_SIZE(flags); i++)
if ((flags[i].mask & xmask) == flags[i].mask)
TRACE("%s ",flags[i].name);
}
......
......@@ -361,8 +361,8 @@ static void DSPROPERTY_descWto1(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA *data1)
{
data1->DeviceId = dataW->DeviceId;
lstrcpynW(data1->ModuleW, dataW->Module, sizeof(data1->ModuleW)/sizeof(*data1->ModuleW));
lstrcpynW(data1->DescriptionW, dataW->Description, sizeof(data1->DescriptionW)/sizeof(*data1->DescriptionW));
lstrcpynW(data1->ModuleW, dataW->Module, ARRAY_SIZE(data1->ModuleW));
lstrcpynW(data1->DescriptionW, dataW->Description, ARRAY_SIZE(data1->DescriptionW));
WideCharToMultiByte(CP_ACP, 0, data1->DescriptionW, -1, data1->DescriptionA, sizeof(data1->DescriptionA)-1, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, data1->ModuleW, -1, data1->ModuleA, sizeof(data1->ModuleA)-1, NULL, NULL);
data1->DescriptionA[sizeof(data1->DescriptionA)-1] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment