Skip to contentSkip to conversation

problem with netback netif copying_receiver flag

DISCUSSION Zang Hongyong 2 participants 2 messages Jun 2, 2008

lore
Share & tools
lore
#0 lore raw

hi,
I'm confused with !! when setting netback rx_copy flag. be->netif->copying_receiver = !!rx_copy
here why use !! ?

why not just
be->netif->copying_receiver = rx_copy

thanks in advance!

Zang Hongyong
[email protected]
2008-06-02

#1 lore raw

Just in case rx_copy has a value other than 0 or 1. Since it's read from xenstore it seemed worth sanitising it. It's not really very important or strictly necessary.

-- Keir

Quoted 19 lines · Zang Hongyong

hi,
I'm confused with !! when setting netback rx_copy flag. be->netif->copying_receiver = !!rx_copy
here why use !! ?

why not just
be->netif->copying_receiver = rx_copy

thanks in advance!

Zang Hongyong
[email protected]
2008-06-02

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel