Re: [ovs-dev] [PATCH] Windows: Fix wmi.c to use count of wchar_t instead of sizeof

2017-01-26 Thread Sairam Venugopal
> boun...@openvswitch.org] On Behalf Of Sairam Venugopal >> Sent: Friday, January 27, 2017 7:58 AM >> To: d...@openvswitch.org >> Subject: [ovs-dev] [PATCH] Windows: Fix wmi.c to use count of wchar_t >> instead of sizeof >> >> wcscat_s and wcscpy_s requires number

Re: [ovs-dev] [PATCH] Windows: Fix wmi.c to use count of wchar_t instead of sizeof

2017-01-26 Thread Alin Serdean
rg > Subject: [ovs-dev] [PATCH] Windows: Fix wmi.c to use count of wchar_t > instead of sizeof > > wcscat_s and wcscpy_s requires number of elements as argument. wchar_t > uses 2 bytes for storage and using sizeof(internal_port_query) causes access > violation error on Window

[ovs-dev] [PATCH] Windows: Fix wmi.c to use count of wchar_t instead of sizeof

2017-01-26 Thread Sairam Venugopal
wcscat_s and wcscpy_s requires number of elements as argument. wchar_t uses 2 bytes for storage and using sizeof(internal_port_query) causes access violation error on Windows 2012 R2 (64 bit). This patch introduces a count_of() function to return the count of the wchar_t array. Signed-off-by: Sair