mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:46:49 +00:00
storage.dll16: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d5bd699e49
commit
c128086179
|
@ -777,7 +777,7 @@ STORAGE_init_storage(stream_access16 *str) {
|
||||||
memset(block,0x00,sizeof(block));
|
memset(block,0x00,sizeof(block));
|
||||||
stde = (struct storage_pps_entry*)block;
|
stde = (struct storage_pps_entry*)block;
|
||||||
MultiByteToWideChar(CP_ACP, 0, "RootEntry", -1, stde->pps_rawname,
|
MultiByteToWideChar(CP_ACP, 0, "RootEntry", -1, stde->pps_rawname,
|
||||||
sizeof(stde->pps_rawname)/sizeof(WCHAR));
|
ARRAY_SIZE(stde->pps_rawname));
|
||||||
stde->pps_sizeofname = (strlenW(stde->pps_rawname)+1) * sizeof(WCHAR);
|
stde->pps_sizeofname = (strlenW(stde->pps_rawname)+1) * sizeof(WCHAR);
|
||||||
stde->pps_type = 5;
|
stde->pps_type = 5;
|
||||||
stde->pps_dir = -1;
|
stde->pps_dir = -1;
|
||||||
|
@ -1751,7 +1751,7 @@ HRESULT CDECL IStorage16_fnCreateStorage(IStorage16 *iface, LPCOLESTR16 pwcsName
|
||||||
nPPSEntries = STORAGE_get_pps_entry(&lpstg->str,ppsent,&(lpstg->stde));
|
nPPSEntries = STORAGE_get_pps_entry(&lpstg->str,ppsent,&(lpstg->stde));
|
||||||
assert(nPPSEntries == 1);
|
assert(nPPSEntries == 1);
|
||||||
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, lpstg->stde.pps_rawname,
|
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, lpstg->stde.pps_rawname,
|
||||||
sizeof(lpstg->stde.pps_rawname)/sizeof(WCHAR));
|
ARRAY_SIZE(lpstg->stde.pps_rawname));
|
||||||
lpstg->stde.pps_sizeofname = (strlenW(lpstg->stde.pps_rawname)+1)*sizeof(WCHAR);
|
lpstg->stde.pps_sizeofname = (strlenW(lpstg->stde.pps_rawname)+1)*sizeof(WCHAR);
|
||||||
lpstg->stde.pps_next = -1;
|
lpstg->stde.pps_next = -1;
|
||||||
lpstg->stde.pps_prev = -1;
|
lpstg->stde.pps_prev = -1;
|
||||||
|
@ -1814,7 +1814,7 @@ HRESULT CDECL IStorage16_fnCreateStream(IStorage16 *iface, LPCOLESTR16 pwcsName,
|
||||||
nPPSEntries = STORAGE_get_pps_entry(&lpstr->str,ppsent,&(lpstr->stde));
|
nPPSEntries = STORAGE_get_pps_entry(&lpstr->str,ppsent,&(lpstr->stde));
|
||||||
assert(nPPSEntries == 1);
|
assert(nPPSEntries == 1);
|
||||||
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, lpstr->stde.pps_rawname,
|
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, lpstr->stde.pps_rawname,
|
||||||
sizeof(lpstr->stde.pps_rawname)/sizeof(WCHAR));
|
ARRAY_SIZE(lpstr->stde.pps_rawname));
|
||||||
lpstr->stde.pps_sizeofname = (strlenW(lpstr->stde.pps_rawname)+1) * sizeof(WCHAR);
|
lpstr->stde.pps_sizeofname = (strlenW(lpstr->stde.pps_rawname)+1) * sizeof(WCHAR);
|
||||||
lpstr->stde.pps_next = -1;
|
lpstr->stde.pps_next = -1;
|
||||||
lpstr->stde.pps_prev = -1;
|
lpstr->stde.pps_prev = -1;
|
||||||
|
@ -1855,7 +1855,7 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName,
|
||||||
lpstg->str.lockbytes = This->str.lockbytes;
|
lpstg->str.lockbytes = This->str.lockbytes;
|
||||||
_ilockbytes16_addref(This->str.lockbytes);
|
_ilockbytes16_addref(This->str.lockbytes);
|
||||||
}
|
}
|
||||||
MultiByteToWideChar( CP_ACP, 0, pwcsName, -1, name, sizeof(name)/sizeof(WCHAR));
|
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, name, ARRAY_SIZE(name));
|
||||||
newpps = STORAGE_look_for_named_pps(&lpstg->str,This->stde.pps_dir,name);
|
newpps = STORAGE_look_for_named_pps(&lpstg->str,This->stde.pps_dir,name);
|
||||||
if (newpps==-1) {
|
if (newpps==-1) {
|
||||||
IStorage16_fnRelease(&lpstg->IStorage16_iface);
|
IStorage16_fnRelease(&lpstg->IStorage16_iface);
|
||||||
|
@ -1897,7 +1897,7 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v
|
||||||
lpstr->str.lockbytes = This->str.lockbytes;
|
lpstr->str.lockbytes = This->str.lockbytes;
|
||||||
_ilockbytes16_addref(This->str.lockbytes);
|
_ilockbytes16_addref(This->str.lockbytes);
|
||||||
}
|
}
|
||||||
MultiByteToWideChar( CP_ACP, 0, pwcsName, -1, name, sizeof(name)/sizeof(WCHAR));
|
MultiByteToWideChar(CP_ACP, 0, pwcsName, -1, name, ARRAY_SIZE(name));
|
||||||
newpps = STORAGE_look_for_named_pps(&lpstr->str,This->stde.pps_dir,name);
|
newpps = STORAGE_look_for_named_pps(&lpstr->str,This->stde.pps_dir,name);
|
||||||
if (newpps==-1) {
|
if (newpps==-1) {
|
||||||
IStream16_fnRelease(&lpstr->IStream16_iface);
|
IStream16_fnRelease(&lpstr->IStream16_iface);
|
||||||
|
|
Loading…
Reference in a new issue