[Asterisk-code-review] stasis: Avoid always true warnings with clang. (asterisk[13])

Friendly Automation asteriskteam at digium.com
Wed Apr 8 09:22:19 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14083 )

Change subject: stasis: Avoid always true warnings with clang.
......................................................................

stasis: Avoid always true warnings with clang.

ASTERISK-28801

Change-Id: I63ba125226b9fe8a018bd28825c877603eb8f398
---
M main/stasis.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/main/stasis.c b/main/stasis.c
index ff638bf..c9b71cf 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -473,9 +473,9 @@
 
 #ifdef AST_DEVMODE
 	topic->statistics = stasis_topic_statistics_create(topic);
-	if (!topic->name || !topic->statistics || res)
+	if (ast_strlen_zero(topic->name) || !topic->statistics || res)
 #else
-	if (!topic->name || res)
+	if (ast_strlen_zero(topic->name) || res)
 #endif
 	{
 		ao2_ref(topic, -1);

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I63ba125226b9fe8a018bd28825c877603eb8f398
Gerrit-Change-Number: 14083
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200408/5d062621/attachment.html>


More information about the asterisk-code-review mailing list