I'd suggest this:

#define EV_SET(kevpin, a, b, c, d, e, f) do {   \
        struct kevent *kevp = kevpin;           \
        (kevp)->ident = (a);                    \
        (kevp)->filter = (b);                   \
        (kevp)->flags = (c);                    \
        (kevp)->fflags = (d);                   \
        (kevp)->data = (e);                     \
        (kevp)->udata = (f);                    \
} while(0)

As opposed to what it is currently defined as:

#define EV_SET(kevp, a, b, c, d, e, f) do {     \
        (kevp)->ident = (a);                    \
        (kevp)->filter = (b);                   \
        (kevp)->flags = (c);                    \
        (kevp)->fflags = (d);                   \
        (kevp)->data = (e);                     \
        (kevp)->udata = (f);                    \
} while(0)

The alternative I'm suggesting will work in the use case:

EV_SET(&kev_in[numchanges++], fd, EVFILT_READ, EV_DELETE, 0, 0, 0);

Which is probably a common way to try to use the macro, and the existing
behavior can certainly catch you off guard...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to