Change in libosmocore[master]: socket: introduce osmo_sock_init3 & osmo_sock_init3_ofd

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

neels gerrit-no-reply at lists.osmocom.org
Thu Aug 27 11:04:13 UTC 2020


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

Change subject: socket: introduce osmo_sock_init3 & osmo_sock_init3_ofd
......................................................................


Patch Set 14:

(7 comments)

https://gerrit.osmocom.org/c/libosmocore/+/19143/13/include/osmocom/core/socket.h 
File include/osmocom/core/socket.h:

https://gerrit.osmocom.org/c/libosmocore/+/19143/13/include/osmocom/core/socket.h@61 
PS13, Line 61: int osmo_sock_init3(uint16_t type, uint8_t proto,
> I don't really like calling this one osmo_sock_init3, since it's not really an upgrade from previous […]
I agree on that


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c 
File src/socket.c:

https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@454 
PS13, Line 454: 		osmo_strlcpy(dest.ip, "Invalid IP", 11)
I know the macro is used only here in a limited code base, but doing this kind of macro safely would require:

  #define FOO do { \
        if ... \
    } while(0)


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@496 
PS13, Line 496: 	if (flags & OSMO_SOCK_F_BIND && !local) {
maybe it's just my own uncertainty about operator precedence, but more braces would be nice


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@500 
PS13, Line 500: 
(ws: two blank lines)


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@502 
PS13, Line 502: 	if (flags & OSMO_SOCK_F_CONNECT && !remote) {
more braces would be nice


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@508 
PS13, Line 508: 	    flags & OSMO_SOCK_F_CONNECT &&
more braces would be nice


https://gerrit.osmocom.org/c/libosmocore/+/19143/13/src/socket.c@525 
PS13, Line 525: 		if (proto != IPPROTO_UDP || flags & OSMO_SOCK_F_UDP_REUSEADDR) {
more braces would be nice



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1eece543e3241ef0e095eb63bb831f7c15a16794
Gerrit-Change-Number: 19143
Gerrit-PatchSet: 14
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Aug 2020 11:04:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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/20200827/e7ea8d84/attachment.htm>


More information about the gerrit-log mailing list