[dpdk-dev] [PATCH 7/8] log: add log stream accessor
David Marchand
david.marchand at redhat.com
Tue Oct 22 18:50:27 CEST 2019
On Tue, Oct 22, 2019 at 6:34 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> On Tue, 22 Oct 2019 11:32:40 +0200
> David Marchand <david.marchand at redhat.com> wrote:
>
> > + if (f == NULL) {
> > + f = default_log_stream;
> > + if (f == NULL) {
> > + /*
> > + * Grab the current value of stderr here, rather than
> > + * just initializing default_log_stream to stderr. This
> > + * ensures that we will always use the current value
> > + * of stderr, even if the application closes and
> > + * reopens it.
> > + */
> > + f = stderr;
> > + }
> > + }
> > + return f;
>
> Why not just the short form?
> return default_log_stream ? : stderr;
>
Moved the existing code around, I can use this short form.
--
David Marchand
More information about the dev
mailing list