• P
    linux-user/sparc/signal.c: Remove dead code · bba390cb
    Peter Maydell 提交于
    Coverity complains (CID 1390847) about some dead code in
    do_sigreturn(). This is an if (err) clause that can never be
    true, copied from the kernel (where __get_user returns an error).
    The one code path that could report an error is in the
    currently commented-out pseudocode for handling FPU register
    restoring, so move the if into that comment (and fix the
    broken indent in the comment in the process).
    
    (The new position for the error check is also the semantically
    correct one -- we should not restore the signal mask from
    the signal frame if we get an error here, so the check must
    be done before set_sigmask(), not after.)
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
    Message-id: 20181115114616.26265-1-peter.maydell@linaro.org
    bba390cb
signal.c 18.8 KB