[Asterisk-code-review] editline: Avoid comparison between pointer and zero characte... (asterisk[13])

Jenkins2 asteriskteam at digium.com
Mon Jan 8 05:52:55 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7857 )

Change subject: editline: Avoid comparison between pointer and zero character constant.
......................................................................

editline: Avoid comparison between pointer and zero character constant.

gcc 7.2 warned about this.

ASTERISK-27559

Change-Id: I48960dda9cf0a11b6a9426f775e632363f8caa74
---
M main/editline/term.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/editline/term.c b/main/editline/term.c
index 03623be..6814cc4 100644
--- a/main/editline/term.c
+++ b/main/editline/term.c
@@ -428,7 +428,7 @@
          */
 	tlen = 0;
 	for (tmp = tlist; tmp < &tlist[T_str]; tmp++)
-		if (*tmp != NULL && *tmp != '\0' && *tmp != *str) {
+		if (*tmp != NULL && **tmp != '\0' && *tmp != *str) {
 			char *ptr;
 
 			for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++)

-- 
To view, visit https://gerrit.asterisk.org/7857
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I48960dda9cf0a11b6a9426f775e632363f8caa74
Gerrit-Change-Number: 7857
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180108/5b17ec53/attachment.html>


More information about the asterisk-code-review mailing list