This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Holger Hans Peter Freyther holger at freyther.deFrom: Holger Hans Peter Freyther <holger at moiji-mobile.com> First we check if a color is defined and then we call it again and use the result. Avoid the second call and use the result of the previous call. --- src/logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging.c b/src/logging.c index 7b53277..36c31c4 100644 --- a/src/logging.c +++ b/src/logging.c @@ -245,7 +245,7 @@ static void _output(struct log_target *target, unsigned int subsys, if (target->use_color) { const char *c = color(subsys); if (c) { - ret = snprintf(buf + offset, rem, "%s", color(subsys)); + ret = snprintf(buf + offset, rem, "%s", c); if (ret < 0) goto err; OSMO_SNPRINTF_RET(ret, rem, offset, len); -- 2.1.3