Fix includes, string length calculation.

Signed-off-by: Fab Tillier <[email protected]>

diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r 
\dev\openib\Mellanox\10916\hw\mlx4\user\nd\main.cpp .\hw\mlx4\user\nd\main.cpp
--- \dev\openib\Mellanox\10916\hw\mlx4\user\nd\main.cpp Mon Sep 10 11:47:19 2012
+++ .\hw\mlx4\user\nd\main.cpp  Tue Sep 04 16:17:39 2012
@@ -29,9 +29,6 @@
 
 #include "precomp.h"
 
-#include <initguid.h>
-#include "ndspi.h"
-
 
 HANDLE g_hHeap;
 #if DBG
@@ -346,7 +343,7 @@ void CALLBACK RegisterProviderW(HWND, HI
     provider.iSecurityScheme = SECURITY_PROTOCOL_NONE;
     provider.dwMessageSize = 0xFFFFFFFF; /* IB supports 32-bit lengths for 
data transfers on RC */
     provider.dwProviderReserved = 0;
-    wcscpy_s( provider.szProtocol, sizeof(provider.szProtocol), L"OpenFabrics 
Network Direct Provider for Mellanox ConnectX" );
+    wcscpy_s( provider.szProtocol, _countof(provider.szProtocol), 
L"OpenFabrics Network Direct Provider for Mellanox ConnectX" );
 
     WSCInstallProvider64_32(
         &providerId, L"%SYSTEMROOT%\\system32\\mlx4nd.dll", &provider, 1, 
&err_no );
diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r 
\dev\openib\Mellanox\10916\hw\mlx4\user\nd\precomp.h .\hw\mlx4\user\nd\precomp.h
--- \dev\openib\Mellanox\10916\hw\mlx4\user\nd\precomp.h        Mon Sep 10 
11:47:19 2012
+++ .\hw\mlx4\user\nd\precomp.h Tue Sep 04 16:17:39 2012
@@ -39,11 +39,12 @@
 #include <winternl.h>
 #include <ws2tcpip.h>
 #include <ws2spi.h>
-#include <InitGuid.h>
-#include <ndspi.h>
 #include <ndstatus.h>
 #include <string.h>
 #include <process.h>
+
+#include <InitGuid.h>
+#include <ndspi.h>
 
 #include "ndfltr.h"

Attachment: ndv2.53.patch
Description: ndv2.53.patch

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to