![]() tr2_cfg_load_patterns() and tr2_load_env_vars() functions are functions with very similar structure that each reads an environment variable, splits its value at the ',' boundaries, and trims the resulting string pieces into an array of strbufs. But the code paths that later use these strbufs take no advantage of the strbuf-ness of the result (they do not benefit from <ptr,len> representation to avoid having to run strlen(<ptr>), for example). Simplify the code by teaching these functions to split into a string list instead; even the trimming comes for free ;-). Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
tr2_cfg.c | ||
tr2_cfg.h | ||
tr2_cmd_name.c | ||
tr2_cmd_name.h | ||
tr2_ctr.c | ||
tr2_ctr.h | ||
tr2_dst.c | ||
tr2_dst.h | ||
tr2_sid.c | ||
tr2_sid.h | ||
tr2_sysenv.c | ||
tr2_sysenv.h | ||
tr2_tbuf.c | ||
tr2_tbuf.h | ||
tr2_tgt.h | ||
tr2_tgt_event.c | ||
tr2_tgt_normal.c | ||
tr2_tgt_perf.c | ||
tr2_tls.c | ||
tr2_tls.h | ||
tr2_tmr.c | ||
tr2_tmr.h |