Change in libosmocore[master]: logging: use LOGL_NOTICE when not loglevel is set

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Apr 12 09:10:45 UTC 2020


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 )

Change subject: logging: use LOGL_NOTICE when not loglevel is set
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/17604/2/src/logging.c 
File src/logging.c:

https://gerrit.osmocom.org/c/libosmocore/+/17604/2/src/logging.c@1064 
PS2, Line 1064: *(uint8_t*) (&
> I think the only proper way t osolve it is to copy the entire 'const' array of 'cat' into dynamically allocated memory, and then make modifications there.

> we should dynamically allocate memory for 'cat' here in this function, then copy over the contents of 'cat' from osmo_log_info [...]

Right, that's exactly how we do this.

> [...] and make the changes there. When done we assign osmo_log_info->cat with the location of the copy we just created. Is this correct?

Vice versa. In the current code (with this patch applied) we allocate memory and immediately assign it to osmo_log_info->cat (line 1046), and then we make changes by casting const pointers to non-const.

I am fine with proposed patch, but ideally we should use a temporary non-const pointer to make changes, and then assign it to osmo_log_info->cat (as was proposed in a comment near line 1046).



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6
Gerrit-Change-Number: 17604
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: fixeria <axilirator at gmail.com>
Gerrit-Comment-Date: Sun, 12 Apr 2020 09:10:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier at sysmocom.de>
Comment-In-Reply-To: fixeria <axilirator at gmail.com>
Comment-In-Reply-To: laforge <laforge at osmocom.org>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200412/b6645e3e/attachment.htm>


More information about the gerrit-log mailing list