From: Jeff Hostetler Date: Fri, 24 Mar 2017 12:36:06 GMT Subject: Re: [PATCH v2 5/7] name-hash: perf improvement for lazy_init_name_hash Message-ID: <89375f59-8716-3ddc-b163-5669452273c5@jeffhostetler.com> In-Reply-To: On 3/23/2017 1:45 PM, Stefan Beller wrote: > On Thu, Mar 23, 2017 at 8:25 AM, Ramsay Jones > wrote: >>> + /* >>> + * Either we have a parent directory and path with slash(es) >>> + * or the directory is an immediate child of the root directory. >>> + */ >>> + assert((parent != NULL) ^ (strchr(prefix->buf, '/') == 0)); >> > > Also this seems part of the actual shipped code, not testing code. > In that case we prefer > > if () > die("BUG: "); > > This is because asserts may be omitted by the compiler, > when compiled with NDEBUG. I mainly wrote that for myself while testing. Now that I'm past that, I'm comfortable removing it completely or converting it to an actual if-die. Jeff