# Re: \[PATCH 01/50\] eth: reset addr\_assign\_type if eth\_mac\_addr() called

- From: Danny Kukawka \<hidden\>
- Date: 2012-02-08 22:58:25 
- List: netdev
- Page: https://ratatoskr.run/netdev/2012/02/3820045
- Thread: https://ratatoskr.run/netdev/2012/02/3819974/t.md

```text
On Mittwoch, 8. Februar 2012, Stephen Hemminger wrote:
> On Wed,  8 Feb 2012 22:10:08 +0100
>
> Danny Kukawka [ref] wrote:
> > +	if (dev->addr_assign_type & NET_ADDR_RANDOM)
> > +		dev->addr_assign_type ^= NET_ADDR_RANDOM;
>
> Why not just avoid the conditional, or better yet use bitops?
>
> 	dev->addr_assign_type &= ~NET_ADDR_RANDOM;

Okay, If I have comments on the other patches back, I will send new versions 
which avoid the if. Thanks for the hint.

Danny
```
