Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12659 )

Change subject: add osmo_classmark_* API
......................................................................


Patch Set 2: Code-Review-1

(5 comments)

Looks good, but I would prefer to avoid useless snprintf() calls in the 'else' 
branches.

https://gerrit.osmocom.org/#/c/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h
File include/osmocom/gsm/protocol/gsm_04_08.h:

https://gerrit.osmocom.org/#/c/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h@59
PS2, Line 59: osmo_classmark
Since this is a part of GSM 04.08, can we use "osmo_gsm48_" as prefix?


https://gerrit.osmocom.org/#/c/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h@63
PS2, Line 63: classmark2
(just wondering) we also have gsm48_classmark2, why not to use it here?


https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c
File src/gsm/gsm48.c:

https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1199
PS2, Line 1199: snprintf(cm1, sizeof(cm1), "no-cm1");
Again, I suggest to avoid this snprintf() call. Just initialize the cm1[]:

  char cm1[42] = "no-cm1";


https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1207
PS2, Line 1207: snprintf
same


https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1217
PS2, Line 1217: snprintf
too



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd27bab0380f7ad0c44c719aa6c8bd62cf7b034c
Gerrit-Change-Number: 12659
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>
Gerrit-Comment-Date: Mon, 21 Jan 2019 05:14:37 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes

Reply via email to