diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-24 16:26:43 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-06 20:56:41 +0000 |
| commit | ade6974defaa83456b36804a9132d5cad65dc27a (patch) | |
| tree | 888d34549383e8f8262081798dcad4f1892eb6d1 /lib/sockunion.c | |
| parent | 9df414feebc0748bbff2ea9071c76be59618e8e6 (diff) | |
*: style for flog_warn conversions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/sockunion.c')
| -rw-r--r-- | lib/sockunion.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c index e1bbbaa0c0..f4e806e928 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -140,8 +140,7 @@ int sockunion_socket(const union sockunion *su) sock = socket(su->sa.sa_family, SOCK_STREAM, 0); if (sock < 0) { char buf[SU_ADDRSTRLEN]; - flog_err(LIB_ERR_SOCKET, - "Can't make socket for %s : %s", + flog_err(LIB_ERR_SOCKET, "Can't make socket for %s : %s", sockunion_log(su, buf, SU_ADDRSTRLEN), safe_strerror(errno)); return -1; @@ -275,8 +274,7 @@ int sockunion_bind(int sock, union sockunion *su, unsigned short port, ret = bind(sock, (struct sockaddr *)su, size); if (ret < 0) { char buf[SU_ADDRSTRLEN]; - flog_err(LIB_ERR_SOCKET, - "can't bind socket for %s : %s", + flog_err(LIB_ERR_SOCKET, "can't bind socket for %s : %s", sockunion_log(su, buf, SU_ADDRSTRLEN), safe_strerror(errno)); } @@ -332,7 +330,7 @@ int sockopt_ttl(int family, int sock, int ttl) if (ret < 0) { flog_err(LIB_ERR_SOCKET, "can't set sockopt IP_TTL %d to socket %d", - ttl, sock); + ttl, sock); return -1; } return 0; @@ -342,9 +340,10 @@ int sockopt_ttl(int family, int sock, int ttl) ret = setsockopt(sock, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (void *)&ttl, sizeof(int)); if (ret < 0) { - flog_err(LIB_ERR_SOCKET, - "can't set sockopt IPV6_UNICAST_HOPS %d to socket %d", - ttl, sock); + flog_err( + LIB_ERR_SOCKET, + "can't set sockopt IPV6_UNICAST_HOPS %d to socket %d", + ttl, sock); return -1; } return 0; @@ -389,9 +388,10 @@ int sockopt_minttl(int family, int sock, int minttl) int ret = setsockopt(sock, IPPROTO_IP, IP_MINTTL, &minttl, sizeof(minttl)); if (ret < 0) - flog_err(LIB_ERR_SOCKET, - "can't set sockopt IP_MINTTL to %d on socket %d: %s", - minttl, sock, safe_strerror(errno)); + flog_err( + LIB_ERR_SOCKET, + "can't set sockopt IP_MINTTL to %d on socket %d: %s", + minttl, sock, safe_strerror(errno)); return ret; } #endif /* IP_MINTTL */ @@ -400,9 +400,10 @@ int sockopt_minttl(int family, int sock, int minttl) int ret = setsockopt(sock, IPPROTO_IPV6, IPV6_MINHOPCOUNT, &minttl, sizeof(minttl)); if (ret < 0) - flog_err(LIB_ERR_SOCKET, - "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s", - minttl, sock, safe_strerror(errno)); + flog_err( + LIB_ERR_SOCKET, + "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s", + minttl, sock, safe_strerror(errno)); return ret; } #endif |
