[PATCH] Audit: EINTR instead of kernel private return codes in audit records

Steve Grubb sgrubb at redhat.com
Wed Nov 14 20:30:55 UTC 2007


On Wednesday 14 November 2007 15:22:08 Eric Paris wrote:
> +       if (unlikely((return_code == -ERESTART_RESTARTBLOCK) ||
> +                    (return_code == -ERESTARTNOHAND) ||
> +                    (return_code == -ERESTARTSYS) ||
> +                    (return_code == -ERESTARTNOINTR)))

Would it be more efficient to say:


if (unlikely(return_code <= -ERESTARTSYS && 
               return_code >= -ERESTART_RESTARTBLOCK))

That gets it down to 2 compares and 1 logical op.

-Steve




More information about the Linux-audit mailing list