Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2006 01:57:07 +0100
From:      "Attilio Rao" <attilio@freebsd.org>
To:        mjacob@freebsd.org
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: a code reduction function addition to cam_xpt
Message-ID:  <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com>
In-Reply-To: <20061119164455.I44297@ns1.feral.com>
References:  <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061119164455.I44297@ns1.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2006/11/20, mjacob@freebsd.org <mjacob@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f>