Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: >> If we were to allow arbitrarily long thread_name[], which may not be >> a bad thing to do (e.g. we do not have to worry about truncation >> making two names ambiguous, for example), then the flex array is the >> right direction to go in, though. > > We don't even need that, AFAICT. ... > ... > And we are taking e.g. "preload_thread" and turning it into strings like > these, and saving it into "struct tr2tls_thread_ctx". > > "preload_thread", // main thread > "th01:preload_thread", // 1st thread > "th02:preload_thread" // 2nd thread > [...] > > So, we don't need to strdup() and store that "preload_thread" anywhere. > It's already a constant string we have hardcoded in the program. We just > need to save a pointer to it. That sounds even simpler.