• Pranith Kumar's avatar
    audit: Remove condition which always evaluates to false · 724e7bfc
    Pranith Kumar authored
    After commit 3e1d0bb6 ("audit: Convert int limit
    uses to u32"), by converting an int to u32, few conditions will always evaluate
    to false.
    
    These warnings were emitted during compilation:
    
    kernel/audit.c: In function ‘audit_set_enabled’:
    kernel/audit.c:347:2: warning: comparison of unsigned expression < 0 is always
    false [-Wtype-limits]
      if (state < AUDIT_OFF || state > AUDIT_LOCKED)
    	  ^
    	  kernel/audit.c: In function ‘audit_receive_msg’:
    	  kernel/audit.c:880:9: warning: comparison of unsigned expression < 0 is
    	  always false [-Wtype-limits]
    	      if (s.backlog_wait_time < 0 ||
    
    The following patch removes those unnecessary conditions.
    Signed-off-by: default avatarPranith Kumar <bobby.prani@gmail.com>
    Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
    724e7bfc
audit.c 52.9 KB