[ovs-dev] [PATCH 1/4] datapath: Factor out code for getting and setting listen mask.

Justin Pettit jpettit at nicira.com
Thu Oct 15 00:53:16 UTC 2009

On Oct 12, 2009, at 11:14 AM, Ben Pfaff wrote:

> +static int get_listen_mask(const struct file *f)
> +{
> +	return (long)f->private_data;
> +}

The changes look reasonable to me.  I guess I'm surprised that you  
don't get a warning on this, since I thought an int was smaller than a  
long on 64-bit Linux systems and there would be the possibility for  
truncation (which I know won't happen here, since the protocol defines  
the listen_mask to be an int).  Is there a reason that you don't cast  
it into an int instead of a long?  Sorry, I don't have a 64-bit system  
handy to test this on.


More information about the dev mailing list