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 <lyn...@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-CC: neels <nhofm...@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 <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to