Skip to content
  • Tycho Andersen's avatar
    seccomp: fix poor type promotion · 319deec7
    Tycho Andersen authored
    
    
    sparse complains,
    
    kernel/seccomp.c:1172:13: warning: incorrect type in assignment (different base types)
    kernel/seccomp.c:1172:13:    expected restricted __poll_t [usertype] ret
    kernel/seccomp.c:1172:13:    got int
    kernel/seccomp.c:1173:13: warning: restricted __poll_t degrades to integer
    
    Instead of assigning this to ret, since we don't use this anywhere, let's
    just test it against 0 directly.
    
    Signed-off-by: default avatarTycho Andersen <tycho@tycho.ws>
    Reported-by: default avatar0day robot <lkp@intel.com>
    Fixes: 6a21cc50
    
     ("seccomp: add a return code to trap to userspace")
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    319deec7