Check the right pointer for being non-null in WelsLogDefault

In case the log level was invalid, GetLogTag returns null.
Checking pCtx doesn't make sense since nothing within the
if block uses pCtx.
This commit is contained in:
Martin Storsjö
2014-01-28 11:48:19 +02:00
parent 9b59153263
commit 0318922654

View File

@@ -207,7 +207,7 @@ void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, v
int32_t i_shift = 0;
str_t* pStr = NULL;
pStr = GetLogTag (kiLevel, &i_shift);
if (NULL != pCtx) {
if (NULL != pStr) {
int32_t iLenTag = strlen (pStr); // confirmed_safe_unsafe_usage
STRCAT (&pBuf[iBufUsed], iBufLeft, pStr); // confirmed_safe_unsafe_usage
iBufUsed += iLenTag;