On Tue, Oct 22, 2019 at 6:34 PM Stephen Hemminger <step...@networkplumber.org> wrote: > > On Tue, 22 Oct 2019 11:32:40 +0200 > David Marchand <david.march...@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