Change in libosmocore[master]: logging sanity: initialize osmo_log_info = NULL

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Jan 28 23:57:02 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12714


Change subject: logging sanity: initialize osmo_log_info = NULL
......................................................................

logging sanity: initialize osmo_log_info = NULL

logging.c assert_loginfo() wants to make sure that an osmo_log_info was set by
asserting non-NULL. Hence we should make sure it is initialized as NULL in the
first place.

Change-Id: Ifd97c945f63cfe9850f025db7e69370866ea133e
---
M src/logging.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/12714/1

diff --git a/src/logging.c b/src/logging.c
index 2bb53ae..b8a84da 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -57,7 +57,7 @@
 osmo_static_assert(_LOG_FLT_COUNT <= 8*sizeof(((struct log_target*)NULL)->filter_map),
 		   enum_logging_filters_fit_in_log_target_filter_map);
 
-struct log_info *osmo_log_info;
+struct log_info *osmo_log_info = NULL;
 
 static struct log_context log_context;
 void *tall_log_ctx = NULL;

-- 
To view, visit https://gerrit.osmocom.org/12714
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd97c945f63cfe9850f025db7e69370866ea133e
Gerrit-Change-Number: 12714
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190128/8b5901d7/attachment.htm>


More information about the gerrit-log mailing list