Change in libosmocore[master]: gsm_7bit_encode_n(): use regular malloc() instead of calloc()

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Feb 1 11:07:33 UTC 2021


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

Change subject: gsm_7bit_encode_n(): use regular malloc() instead of calloc()
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/22543/1/src/gsm/gsm_utils.c 
File src/gsm/gsm_utils.c:

https://gerrit.osmocom.org/c/libosmocore/+/22543/1/src/gsm/gsm_utils.c@332 
PS1, Line 332: 	uint8_t *data = malloc(septet_len + 1);
What about allocating in the stack instead, since you are always freeing the data and only using it inside the function.
https://man7.org/linux/man-pages/man3/alloca.3.html



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6956cbd83b2999dbcf8e2d210134b0a166c33efb
Gerrit-Change-Number: 22543
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 01 Feb 2021 11:07:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210201/02186a80/attachment.htm>


More information about the gerrit-log mailing list