msi: Clean up memset usage.
This commit is contained in:
parent
edb58a6d05
commit
3a94011ab6
|
@ -573,8 +573,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
||||||
|
|
||||||
MSI_SetPropertyW(package, szAction, szInstall);
|
MSI_SetPropertyW(package, szAction, szInstall);
|
||||||
|
|
||||||
package->script = msi_alloc(sizeof(MSISCRIPT));
|
package->script = msi_alloc_zero(sizeof(MSISCRIPT));
|
||||||
memset(package->script,0,sizeof(MSISCRIPT));
|
|
||||||
|
|
||||||
package->script->InWhatSequence = SEQUENCE_INSTALL;
|
package->script->InWhatSequence = SEQUENCE_INSTALL;
|
||||||
|
|
||||||
|
@ -3383,7 +3382,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
MSICOMPONENT* component = cl->component;
|
MSICOMPONENT* component = cl->component;
|
||||||
WCHAR buf[21];
|
WCHAR buf[21];
|
||||||
|
|
||||||
memset(buf,0,sizeof(buf));
|
buf[0] = 0;
|
||||||
if (component->ComponentId)
|
if (component->ComponentId)
|
||||||
{
|
{
|
||||||
TRACE("From %s\n",debugstr_w(component->ComponentId));
|
TRACE("From %s\n",debugstr_w(component->ComponentId));
|
||||||
|
@ -3914,8 +3913,7 @@ static LPWSTR load_ttfname_from(LPCWSTR filename)
|
||||||
ttRecord.uStringOffset +
|
ttRecord.uStringOffset +
|
||||||
ttNTHeader.uStorageOffset,
|
ttNTHeader.uStorageOffset,
|
||||||
NULL, FILE_BEGIN);
|
NULL, FILE_BEGIN);
|
||||||
buf = msi_alloc( ttRecord.uStringLength + 1 + strlen(tt) );
|
buf = msi_alloc_zero( ttRecord.uStringLength + 1 + strlen(tt) );
|
||||||
memset(buf, 0, ttRecord.uStringLength + 1 + strlen(tt));
|
|
||||||
ReadFile(handle, buf, ttRecord.uStringLength, &dwRead, NULL);
|
ReadFile(handle, buf, ttRecord.uStringLength, &dwRead, NULL);
|
||||||
if (strlen(buf) > 0)
|
if (strlen(buf) > 0)
|
||||||
{
|
{
|
||||||
|
@ -4080,8 +4078,7 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
|
||||||
sz+=3;
|
sz+=3;
|
||||||
sz *= sizeof(WCHAR);
|
sz *= sizeof(WCHAR);
|
||||||
|
|
||||||
output = msi_alloc(sz);
|
output = msi_alloc_zero(sz);
|
||||||
memset(output,0,sz);
|
|
||||||
strcpyW(output,advertise);
|
strcpyW(output,advertise);
|
||||||
msi_free(advertise);
|
msi_free(advertise);
|
||||||
|
|
||||||
|
|
|
@ -1160,8 +1160,7 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
|
||||||
size += strlenW(verb->Argument);
|
size += strlenW(verb->Argument);
|
||||||
size += 4;
|
size += 4;
|
||||||
|
|
||||||
command = msi_alloc(size * sizeof (WCHAR));
|
command = msi_alloc_zero(size * sizeof (WCHAR));
|
||||||
memset(command,0,size*sizeof(WCHAR));
|
|
||||||
|
|
||||||
strcpyW(command,advertise);
|
strcpyW(command,advertise);
|
||||||
if (verb->Argument)
|
if (verb->Argument)
|
||||||
|
|
|
@ -1891,29 +1891,29 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
||||||
FIXME("%s %s %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
|
FIXME("%s %s %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
|
||||||
dwReinstallMode);
|
dwReinstallMode);
|
||||||
|
|
||||||
memset(reinstallmode,0,sizeof(reinstallmode));
|
|
||||||
ptr = reinstallmode;
|
ptr = reinstallmode;
|
||||||
|
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEMISSING)
|
if (dwReinstallMode & REINSTALLMODE_FILEMISSING)
|
||||||
{ *ptr = 'p'; ptr++; }
|
*ptr++ = 'p';
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEOLDERVERSION)
|
if (dwReinstallMode & REINSTALLMODE_FILEOLDERVERSION)
|
||||||
{ *ptr = 'o'; ptr++; }
|
*ptr++ = 'o';
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEEQUALVERSION)
|
if (dwReinstallMode & REINSTALLMODE_FILEEQUALVERSION)
|
||||||
{ *ptr = 'w'; ptr++; }
|
*ptr++ = 'w';
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEEXACT)
|
if (dwReinstallMode & REINSTALLMODE_FILEEXACT)
|
||||||
{ *ptr = 'd'; ptr++; }
|
*ptr++ = 'd';
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEVERIFY)
|
if (dwReinstallMode & REINSTALLMODE_FILEVERIFY)
|
||||||
{ *ptr = 'c'; ptr++; }
|
*ptr++ = 'c';
|
||||||
if (dwReinstallMode & REINSTALLMODE_FILEREPLACE)
|
if (dwReinstallMode & REINSTALLMODE_FILEREPLACE)
|
||||||
{ *ptr = 'a'; ptr++; }
|
*ptr++ = 'a';
|
||||||
if (dwReinstallMode & REINSTALLMODE_USERDATA)
|
if (dwReinstallMode & REINSTALLMODE_USERDATA)
|
||||||
{ *ptr = 'u'; ptr++; }
|
*ptr++ = 'u';
|
||||||
if (dwReinstallMode & REINSTALLMODE_MACHINEDATA)
|
if (dwReinstallMode & REINSTALLMODE_MACHINEDATA)
|
||||||
{ *ptr = 'm'; ptr++; }
|
*ptr++ = 'm';
|
||||||
if (dwReinstallMode & REINSTALLMODE_SHORTCUT)
|
if (dwReinstallMode & REINSTALLMODE_SHORTCUT)
|
||||||
{ *ptr = 's'; ptr++; }
|
*ptr++ = 's';
|
||||||
if (dwReinstallMode & REINSTALLMODE_PACKAGE)
|
if (dwReinstallMode & REINSTALLMODE_PACKAGE)
|
||||||
{ *ptr = 'v'; ptr++; }
|
*ptr++ = 'v';
|
||||||
|
*ptr = 0;
|
||||||
|
|
||||||
sz = sizeof(sourcepath);
|
sz = sizeof(sourcepath);
|
||||||
MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED,
|
MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED,
|
||||||
|
|
Loading…
Reference in New Issue