Patch Set 1: Code-Review-1

(1 comment)

I think test case is required which tried osmo_strlcpy(src=NULL), 
osmo_strlcpy(siz=0) etc. to ensure that fix actually works as expected.

https://gerrit.osmocom.org/#/c/4407/1/src/utils.c
File src/utils.c:

Line 375:       size_t ret = src ? strlen(src) : 0;
Why not simply return here right away? I thought this is the preferred style 
for error handling?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba7ba262ace2e370a4b9a550b3131fb13f07413
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>
Gerrit-HasComments: Yes

Reply via email to