• Joe Perches's avatar
    wireless: Convert compare_ether_addr to ether_addr_equal · ac422d3c
    Joe Perches authored
    Use the new bool function ether_addr_equal to add
    some clarity and reduce the likelihood for misuse
    of compare_ether_addr for sorting.
    
    I removed a conversion from scan.c/cmp_bss_core
    that appears to be a sorting function.
    
    Done via cocci script:
    
    $ cat compare_ether_addr.cocci
    @@
    expression a,b;
    @@
    -	!compare_ether_addr(a, b)
    +	ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	compare_ether_addr(a, b)
    +	!ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	!ether_addr_equal(a, b) == 0
    +	ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	!ether_addr_equal(a, b) != 0
    +	!ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	ether_addr_equal(a, b) == 0
    +	!ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	ether_addr_equal(a, b) != 0
    +	ether_addr_equal(a, b)
    
    @@
    expression a,b;
    @@
    -	!!ether_addr_equal(a, b)
    +	ether_addr_equal(a, b)
    Signed-off-by: default avatarJoe Perches <joe@perches.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ac422d3c
util.c 25.8 KB