Change in ...libosmocore[master]: OSMO_SOCKADDR_STR_FMT_ARGS: remove useless condition

neels gerrit-no-reply at lists.osmocom.org
Thu Aug 29 22:51:11 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15340


Change subject: OSMO_SOCKADDR_STR_FMT_ARGS: remove useless condition
......................................................................

OSMO_SOCKADDR_STR_FMT_ARGS: remove useless condition

Since (R)->ip is a char[], it is always non-NULL. The (x ? : "") condition is
completely pointless. Remove it.

Change-Id: I13ed06776a784cfa99bbdfca2bb4dfe12913a1ec
---
M include/osmocom/core/sockaddr_str.h
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/15340/1

diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h
index 253b755..7c01732 100644
--- a/include/osmocom/core/sockaddr_str.h
+++ b/include/osmocom/core/sockaddr_str.h
@@ -62,7 +62,7 @@
  *     printf("got " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(my_sockaddr_str));
  */
 #define OSMO_SOCKADDR_STR_FMT "%s:%u"
-#define OSMO_SOCKADDR_STR_FMT_ARGS(R) ((R)->ip ? : ""), (R)->port
+#define OSMO_SOCKADDR_STR_FMT_ARGS(R) (R)->ip, (R)->port
 
 bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str);
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I13ed06776a784cfa99bbdfca2bb4dfe12913a1ec
Gerrit-Change-Number: 15340
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/24ed040d/attachment.html>


More information about the gerrit-log mailing list