Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
[reactos.git] / reactos / lib / rtl / debug.c
index bfde2e0..a17367f 100644 (file)
@@ -79,7 +79,7 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix,
 
         /* Copy it */
         strncpy(Buffer, Prefix, PrefixLength);
-        
+
         /* Do the printf */
         Length = _vsnprintf(Buffer + PrefixLength,
                             sizeof(Buffer) - PrefixLength,
@@ -109,7 +109,7 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix,
         /* Add the prefix */
         Length += PrefixLength;
     }
-    
+
     /* Build the string */
     DebugString.Length = Length;
     DebugString.Buffer = Buffer;
@@ -202,17 +202,19 @@ __cdecl
 DbgPrint(PCCH Format,
          ...)
 {
+       ULONG n;
     va_list ap;
 
     /* Call the internal routine that also handles ControlC */
     va_start(ap, Format);
-    return vDbgPrintExWithPrefixInternal("",
+    n = vDbgPrintExWithPrefixInternal("",
                                          -1,
                                          DPFLTR_ERROR_LEVEL,
                                          Format,
                                          ap,
                                          TRUE);
     va_end(ap);
+       return n;
 }
 
 /*
@@ -225,17 +227,19 @@ DbgPrintEx(IN ULONG ComponentId,
            IN PCCH Format,
            ...)
 {
+       ULONG n;
     va_list ap;
 
     /* Call the internal routine that also handles ControlC */
     va_start(ap, Format);
-    return vDbgPrintExWithPrefixInternal("",
+    n = vDbgPrintExWithPrefixInternal("",
                                          ComponentId,
                                          Level,
                                          Format,
                                          ap,
                                          TRUE);
     va_end(ap);
+       return n;
 }
 
 /*
@@ -246,16 +250,19 @@ __cdecl
 DbgPrintReturnControlC(PCH Format,
                        ...)
 {
+       ULONG n;
     va_list ap;
 
     /* Call the internal routine that also handles ControlC */
     va_start(ap, Format);
-    return vDbgPrintExWithPrefixInternal("",
+    n = vDbgPrintExWithPrefixInternal("",
                                          -1,
                                          DPFLTR_ERROR_LEVEL,
                                          Format,
                                          ap,
                                          FALSE);
+    va_end(ap);
+       return n;
 }
 
 /*