Skip to content
  • Corey Minyard's avatar
    c9c47229
    ipmi: Fix macro issues · c9c47229
    Corey Minyard authored
    Macro parameters should almost always have () around them when used.
    llvm reported an error on this.
    
    Remove redundant parenthesis and put parenthesis around the entire
    macros with assignments in case they are used in an expression.
    
    The macros were doing ((v) & 1) for a binary input, but that only works
    if v == 0 or if v & 1.  Changed to !!(v) so they work for all values.
    
    Remove some unused macros.
    
    Reported in https://bugs.launchpad.net/bugs/1651167
    
    
    
    An audit of these changes found no semantic changes; this is just
    cleanups for proper style and to avoid a compiler warning.
    
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    c9c47229
    ipmi: Fix macro issues
    Corey Minyard authored
    Macro parameters should almost always have () around them when used.
    llvm reported an error on this.
    
    Remove redundant parenthesis and put parenthesis around the entire
    macros with assignments in case they are used in an expression.
    
    The macros were doing ((v) & 1) for a binary input, but that only works
    if v == 0 or if v & 1.  Changed to !!(v) so they work for all values.
    
    Remove some unused macros.
    
    Reported in https://bugs.launchpad.net/bugs/1651167
    
    
    
    An audit of these changes found no semantic changes; this is just
    cleanups for proper style and to avoid a compiler warning.
    
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Loading