a code reduction function addition to cam_xpt

Attilio Rao attilio at freebsd.org
Mon Nov 20 00:57:15 UTC 2006


2006/11/20, mjacob at freebsd.org <mjacob at freebsd.org>:
>
> > Would not be better a preprocessing stub?
> >
> > something like:
> >
> > #define XPT_PRINT(path, fmt, ...) do {
> >           \
> >             xpt_print_path(path);
> >                     \
> >             printf(fmt, __VA_ARGS__);
> >                 \
> > } while (0)
> >
>
> Well, it's uglier (IMO0, doesn't get formal checking (which I forgot to
> add to the define in cam_xpt.h), and you can't port it to systems that
> have an older compiler. Other than that, it's probably better.

Erm, we make large use of variadic macros into the code :)

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-scsi mailing list