[Asterisk-code-review] editline: Avoid comparison between pointer and zero characte... (asterisk[master])
Alexander Traud
asteriskteam at digium.com
Sat Jan 6 06:46:38 CST 2018
Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/7856
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/7856/1
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/7856
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48960dda9cf0a11b6a9426f775e632363f8caa74
Gerrit-Change-Number: 7856
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180106/fbae95dd/attachment.html>
More information about the asterisk-code-review
mailing list