eal/windows: use lowercase filenames for system headers
[dpdk.git] / lib / librte_eal / windows / eal / include / rte_os.h
index 9e76261..95a19b2 100644 (file)
@@ -15,8 +15,8 @@
 extern "C" {
 #endif
 
-#include <Windows.h>
-#include <BaseTsd.h>
+#include <windows.h>
+#include <basetsd.h>
 #include <pthread.h>
 #include <stdio.h>
 
@@ -64,12 +64,15 @@ asprintf(char **buffer, const char *format, ...)
        va_list arg;
 
        va_start(arg, format);
-       size = vsnprintf(NULL, 0, format, arg) + 1;
+       size = vsnprintf(NULL, 0, format, arg);
        va_end(arg);
+       if (size < 0)
+               return -1;
+       size++;
 
        *buffer = malloc(size);
-       if (buffer == NULL)
-               printf("Cannot allocate memory");
+       if (*buffer == NULL)
+               return -1;
 
        va_start(arg, format);
        ret = vsnprintf(*buffer, size, format, arg);