libosmocore[master]: utils: add function gsm_fn_as_gsmtime_str()

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Jul 4 13:15:23 UTC 2017


Patch Set 4: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/3048/4/src/gsm/gsm_utils.c
File src/gsm/gsm_utils.c:

Line 757: 	static char result[256];
I think this is too large.  Please do a more realistic calculaition. Without computing, I'm sure we never even hit 128 or even 64 bytes wen printing four unsigned integers that are modulo a very small value.  In fact, it's not more than 2 decimals for each of them, so 4*3=12 is the real size needed. Sizing the buffer to something like 20 or 32 is for sure far sufficient.  WE don't want to end up pusing 256 useless bytes on the stack of an OsmocomBB phone...


-- 
To view, visit https://gerrit.osmocom.org/3048
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8015d2ded3940b01b35df7b72fc35c70c25e9926
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list