From: Emily Shaffer Date: Tue, 04 Feb 2020 23:16:02 GMT Subject: Re: [PATCH v5 08/15] bugreport: include user interactive shell Message-ID: <20200204231602.GG87163@google.com> In-Reply-To: On Thu, Jan 30, 2020 at 11:28:40PM +0100, Martin Ă…gren wrote: > On Fri, 24 Jan 2020 at 04:41, wrote: > > + char *shell = NULL; > > (Unnecessary initialization.) > > > + shell = getenv("SHELL"); > > + strbuf_addf(sys_info, "$SHELL (typically, interactive shell): %s\n", > > + shell ? shell : "(NULL)"); > > Thanks for avoiding a classic pitfall. :-) Thank Junio. I fell right into it because it Just Works in gcc. ;) > "" instead of "(NULL)"? "NULL" is mostly an implementation > detail. Sure, why not.