You are right Ben I will #ifndef out the local variables and change the code to be inline with the coding style.
Kind Regards, Alin. ________________________________________ From: Ben Pfaff [b...@nicira.com] Sent: Tuesday, July 22, 2014 9:14 PM To: Alin Serdean Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH 4/5] Changes needed to netlink-socket for MSVC On Thu, Jul 17, 2014 at 07:34:51PM +0000, Alin Serdean wrote: > Add the structure sockaddr_nl to netlink-socket.c when compiling under > MSVC. > > Add two functions set_sock_pid_in_kernel and portid_next. This will allow > the channel identification for the kernel extension to send back messages. > > Replace send with WriteFile equivalent and ignore nl_sock_drain for the moment > under MSVC. > > On MSVC the rcvbuf does not have a reasonable limit, the current value can > suffice for our needs. > > Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com> I don't think sockaddr_nl is really used on Windows. It appears that we just need to #ifndef _WIN32 out the local variables of those types in nl_sock_create(). Please put return types and function names on separate lines, matching the OVS style, e.g.: uint32_t portid_next() OVS_GUARDED_BY(portid_mutex) not uint32_t portid_next() OVS_GUARDED_BY(portid_mutex) Please prefer /**/ comments over //. Please write a space after 'if' here: + if(sock->handle == INVALID_HANDLE_VALUE) { Please indent properly (and write a space after 'if'): + if(!retval) { + retval = -1; + _set_errno(EAGAIN); + } Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev