]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
va_args-20040406
authorJeffrey Altman <jaltman@mit.edu>
Tue, 6 Apr 2004 23:26:37 +0000 (23:26 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 6 Apr 2004 23:26:37 +0000 (23:26 +0000)
Who at IBM was stupid enough to believe it is acceptable to
pass a va_args variable into a function without initializing
it with va_start()?  Why would you ever bother to do otherwise?

src/WINNT/talocale/tal_dialog.cpp
src/WINNT/talocale/tal_string.cpp

index f31bb29d5baa0495953005107231cc5fad6f2ceb..7bf779ad712a519fe98ad0c76b48da1d07259767 100644 (file)
@@ -76,7 +76,7 @@ int ModalDialogParam (int idd, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwI
 int cdecl Message (UINT type, LPCTSTR title, LPCTSTR text, LPCTSTR fmt, ...)
 {
    va_list  arg;
-   if (fmt != NULL)
+   // if (fmt != NULL)
       va_start (arg, fmt);
    return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
 }
@@ -85,7 +85,7 @@ int cdecl Message (UINT type, LPCTSTR title, LPCTSTR text, LPCTSTR fmt, ...)
 int cdecl Message (UINT type, LPCTSTR title, int text, LPCTSTR fmt, ...)
 {
    va_list  arg;
-   if (fmt != NULL)
+   // if (fmt != NULL)
       va_start (arg, fmt);
    return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
 }
@@ -94,7 +94,7 @@ int cdecl Message (UINT type, LPCTSTR title, int text, LPCTSTR fmt, ...)
 int cdecl Message (UINT type, int title, LPCTSTR text, LPCTSTR fmt, ...)
 {
    va_list  arg;
-   if (fmt != NULL)
+   // if (fmt != NULL)
       va_start (arg, fmt);
    return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
 }
@@ -103,7 +103,7 @@ int cdecl Message (UINT type, int title, LPCTSTR text, LPCTSTR fmt, ...)
 int cdecl Message (UINT type, int title, int text, LPCTSTR fmt, ...)
 {
    va_list  arg;
-   if (fmt != NULL)
+   // if (fmt != NULL)
       va_start (arg, fmt);
    return vMessage (type, (LONG)title, (LONG)text, fmt, arg);
 }
index b1bb83367d40c155295427860a07157013250843..bae31ee0b92ec2280be93e9687049e63453b6b60 100644 (file)
@@ -181,7 +181,7 @@ void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LONG ids, LPCT
 void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemplate, LPCTSTR pszFormat, ...)
 {
    va_list arg;
-   if (pszFormat != NULL)
+   //if (pszFormat != NULL)
       va_start (arg, pszFormat);
    vFormatMultiString (ppszTarget, fAddHead, (LONG)pszTemplate, pszFormat, arg);
 }
@@ -189,7 +189,7 @@ void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, LPCTSTR pszTemp
 void cdecl FormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplate, LPCTSTR pszFormat, ...)
 {
    va_list arg;
-   if (pszFormat != NULL)
+   //if (pszFormat != NULL)
       va_start (arg, pszFormat);
    vFormatMultiString (ppszTarget, fAddHead, (LONG)idsTemplate, pszFormat, arg);
 }
@@ -212,7 +212,7 @@ void cdecl vFormatMultiString (LPTSTR *ppszTarget, BOOL fAddHead, int idsTemplat
 LPTSTR cdecl FormatString (LPCTSTR psz, LPCTSTR pszFmt, ...)
 {
    va_list arg;
-   if (pszFmt != NULL)
+   //if (pszFmt != NULL)
       va_start (arg, pszFmt);
    return vFormatString ((LONG)psz, pszFmt, arg);
 }
@@ -220,7 +220,7 @@ LPTSTR cdecl FormatString (LPCTSTR psz, LPCTSTR pszFmt, ...)
 LPTSTR cdecl FormatString (int ids, LPCTSTR pszFmt, ...)
 {
    va_list  arg;
-   if (pszFmt != NULL)
+   //if (pszFmt != NULL)
       va_start (arg, pszFmt);
    return vFormatString ((LONG)ids, pszFmt, arg);
 }