Change in libosmocore[master]: stat, rate_ctr: allow setting group name using a format string

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 7 12:22:32 UTC 2021


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

Change subject: stat,rate_ctr: allow setting group name using a format string
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/24576/1//COMMIT_MSG 
Commit Message:

PS1: 
talloc_free(NULL) is (like all free-style API) safe. So no need for the NULL-check beforehand.


https://gerrit.osmocom.org/c/libosmocore/+/24576/1/src/rate_ctr.c 
File src/rate_ctr.c:

https://gerrit.osmocom.org/c/libosmocore/+/24576/1/src/rate_ctr.c@307 
PS1, Line 307: 	grp->name = name;
> Because osmo_talloc_replace_string() duplicates the given string using talloc_strdup(). […]
you could introduce a generic osmo_talloc_replace_string_fmt() or the like which basically is 100% of this function, but in a generic way, as &grp->name is passed as an input argument.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6e813476cfb6a0ad275c4a51e9f065eeca8cb406
Gerrit-Change-Number: 24576
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 07 Jun 2021 12:22:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210607/43893379/attachment.htm>


More information about the gerrit-log mailing list