Module: wine Branch: master Commit: fb2a3914e11a3ae9dbe656f0fc27e4a9ef47d480 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fb2a3914e11a3ae9dbe656f0fc...
Author: Kai Blin kai.blin@gmail.com Date: Fri Jan 5 11:00:43 2007 +0100
ole32: Remove redundant NULL check (Coverity).
---
dlls/ole32/ole2.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 151957c..5da68fc 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2562,15 +2562,7 @@ BSTR WINAPI PropSysAllocString(LPCOLESTR */ newBuffer++;
- /* - * Copy the information in the buffer. - * Since it is valid to pass a NULL pointer here, we'll initialize the - * buffer to nul if it is the case. - */ - if (str != 0) - memcpy(newBuffer, str, bufferSize); - else - memset(newBuffer, 0, bufferSize); + memcpy(newBuffer, str, bufferSize);
/* * Make sure that there is a nul character at the end of the