For some reason neither MSVC nor MinGW complained?
cppcheck did (once told that msg is a printf-style
function).
Change-Id: Ia688ec12e642de699811ced8668b40be9fbb6155
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1672
Message-Id: <
20260508153108.13488-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36862.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
*pszValue = (LPWSTR)malloc(++dwLength * sizeof(WCHAR));
if (*pszValue == NULL)
{
- msg(M_FATAL, "%s: malloc(%u) failed", dwLength * sizeof(WCHAR));
+ msg(M_FATAL, "%s: malloc(%u) failed", __FUNCTION__, dwLength * sizeof(WCHAR));
return ERROR_OUTOFMEMORY;
}
}
default:
- msg(M_NONFATAL, "%s: \"%ls\" registry value is not string (type %u)", __FUNCTION__,
- dwValueType);
+ msg(M_NONFATAL, "%s: \"%ls\" registry value is not string (type %u)",
+ __FUNCTION__, szName, dwValueType);
return ERROR_UNSUPPORTED_TYPE;
}
}