]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix some msg() calls with wrong number of arguments in Windows-only code
authorFrank Lichtenheld <frank@lichtenheld.com>
Fri, 8 May 2026 15:31:02 +0000 (17:31 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 11 May 2026 12:03:29 +0000 (14:03 +0200)
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>
src/openvpnmsica/msiex.c
src/tapctl/tap.c

index f8bf6aed99d5b64c7bc8d14cb9d6bf62f00066a9..4d48f06cee068fcfd822c67a76d68fb9fa27e59c 100644 (file)
@@ -51,7 +51,7 @@ msi_get_string(_In_ MSIHANDLE hInstall, _In_z_ LPCWSTR szName, _Out_ LPWSTR *psz
         *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;
         }
 
index 16e3c0b930a96db15c2554019fc5e41c090c956a..1d94988d65458f7336c037f0f0102c040d1273ae 100644 (file)
@@ -487,8 +487,8 @@ get_reg_string(_In_ HKEY hKey, _In_ LPCWSTR szName, _Out_ LPWSTR *pszValue)
         }
 
         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;
     }
 }