From: Fabian Maurer dark.shadow4@web.de
Now that we check for null in the constructor, the name can't be null anymore --- dlls/oleaut32/olefont.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index 78361e5f9fc..6a98067b0bf 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -637,10 +637,7 @@ static HRESULT WINAPI OLEFontImpl_get_Name(
realize_font(this);
- if (this->description.lpstrName!=0) - *pname = SysAllocString(this->description.lpstrName); - else - *pname = 0; + *pname = SysAllocString(this->description.lpstrName);
return S_OK; } @@ -1673,11 +1670,8 @@ static HRESULT WINAPI OLEFontImpl_Save( if (written != sizeof(DWORD)) return E_FAIL;
/* FontName */ - if (this->description.lpstrName) - string_size = WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName, - lstrlenW(this->description.lpstrName), NULL, 0, NULL, NULL ); - else - string_size = 0; + string_size = WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName, + lstrlenW(this->description.lpstrName), NULL, 0, NULL, NULL );
IStream_Write(pOutStream, &string_size, sizeof(BYTE), &written); if (written != sizeof(BYTE)) return E_FAIL; @@ -1720,10 +1714,9 @@ static HRESULT WINAPI OLEFontImpl_GetSizeMax( pcbSize->u.LowPart += sizeof(DWORD); /* Size */ pcbSize->u.LowPart += sizeof(BYTE); /* StrLength */
- if (this->description.lpstrName!=0) - pcbSize->u.LowPart += WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName, - lstrlenW(this->description.lpstrName), - NULL, 0, NULL, NULL ); + pcbSize->u.LowPart += WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName, + lstrlenW(this->description.lpstrName), + NULL, 0, NULL, NULL );
return S_OK; }