[ovs-dev] [PATCH 2/2] netdev-windows: use bitwise comparison for flags

Sairam Venugopal vsairam at vmware.com
Thu Oct 27 20:44:58 UTC 2016


Acked-by: Sairam Venugopal <vsairam at vmware.com>


On 10/27/16, 12:20 PM, "Alin Serdean" <aserdean at cloudbasesolutions.com>
wrote:

>Use bitwise comparison when checking flags set by the kernel for the
>device.
>
>Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>---
> lib/netdev-windows.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c
>index 423a00b..f5e809e 100644
>--- a/lib/netdev-windows.c
>+++ b/lib/netdev-windows.c
>@@ -138,11 +138,11 @@ dp_to_netdev_ifi_flags(uint32_t dp_flags)
> {
>     uint32_t nd_flags = 0;
> 
>-    if (dp_flags && OVS_WIN_NETDEV_IFF_UP) {
>+    if (dp_flags & OVS_WIN_NETDEV_IFF_UP) {
>         nd_flags |= NETDEV_UP;
>     }
> 
>-    if (dp_flags && OVS_WIN_NETDEV_IFF_PROMISC) {
>+    if (dp_flags & OVS_WIN_NETDEV_IFF_PROMISC) {
>         nd_flags |= NETDEV_PROMISC;
>     }
> 
>-- 
>2.9.2.windows.1
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=CwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Dc
>ruz40PROJ40ROzSpxyQSLw6fcrOWpJgEcEmNR3JEQ&m=4CDe4lKBXjOoLlQZxCqFEhQcqst98G
>z2UAbZ8pZAl0k&s=FS2RIMVZeM8240lgqp5h8xxTvELywWt0dlzJqmDlVZ4&e= 




More information about the dev mailing list