PR43905 pointed out a problem with the EV_SET macro if the
passed struct kevent pointer were specified with an expression with
side effects (e.g., "kevp++"). This was fixed in rS110241, but by
using a local block that defined an internal variable (named "kevp")
to get the pointer value once. This worked, but could cause issues if
an existing variable named "kevp" is in scope. To avoid that issue,
@jilles pointed out that "C99 compound literals and designated
initializers allow doing this cleanly using a macro". This change
incorporates that suggestion, essentially verbatim from @jilles
comment on PR43905.
I should note that the goal of making this change is primarily to remove the last (potential) open issue in PR43905 and close it. One could certainly make the argument that the existing solution is sufficient and the bug should just be closed as-is. I'm open to hearing such an argument.
PR: 43905