[asterisk-commits] mjordan: branch 11 r434187 - in /branches/11/channels: chan_sip.c chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 6 20:59:00 CDT 2015


Author: mjordan
Date: Mon Apr  6 20:58:57 2015
New Revision: 434187

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434187
Log:
clang compiler warnings: Fix non-literal-null-conversion warnings

Clang will flag errors when a char pointer is set to '\0', as opposed to a
value that the char pointer points to. This patch fixes this warning
in a variety of locations.

Review: https://reviewboard.asterisk.org/r/4551

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4551.patch submitted by dkdegroot (License 6600)

Modified:
    branches/11/channels/chan_sip.c
    branches/11/channels/chan_skinny.c

Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=434187&r1=434186&r2=434187
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Mon Apr  6 20:58:57 2015
@@ -19496,13 +19496,13 @@
 	char *oldcontext, *newcontext, *stalecontext, *stringp, newlist[AST_MAX_CONTEXT];
 
 	while ((oldcontext = strsep(&old, "&"))) {
-		stalecontext = '\0';
+		stalecontext = NULL;
 		ast_copy_string(newlist, new, sizeof(newlist));
 		stringp = newlist;
 		while ((newcontext = strsep(&stringp, "&"))) {
 			if (!strcmp(newcontext, oldcontext)) {
 				/* This is not the context you're looking for */
-				stalecontext = '\0';
+				stalecontext = NULL;
 				break;
 			} else if (strcmp(newcontext, oldcontext)) {
 				stalecontext = oldcontext;

Modified: branches/11/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_skinny.c?view=diff&rev=434187&r1=434186&r2=434187
==============================================================================
--- branches/11/channels/chan_skinny.c (original)
+++ branches/11/channels/chan_skinny.c Mon Apr  6 20:58:57 2015
@@ -2024,13 +2024,13 @@
 	char *oldcontext, *newcontext, *stalecontext, *stringp, newlist[AST_MAX_CONTEXT];
 
 	while ((oldcontext = strsep(&old, "&"))) {
-		stalecontext = '\0';
+		stalecontext = NULL;
 		ast_copy_string(newlist, new, sizeof(newlist));
 		stringp = newlist;
 		while ((newcontext = strsep(&stringp, "&"))) {
 			if (strcmp(newcontext, oldcontext) == 0) {
 				/* This is not the context you're looking for */
-				stalecontext = '\0';
+				stalecontext = NULL;
 				break;
 			} else if (strcmp(newcontext, oldcontext)) {
 				stalecontext = oldcontext;




More information about the asterisk-commits mailing list