/pidgin/main: 209a1350d87f: Assign pointers to NULL rather than 0.

Michael McConville mmcconville at mykolab.com
Wed Oct 21 10:16:14 EDT 2015


Changeset: 209a1350d87f3dce32d4ae98a2740678e1a28545
Author:	 Michael McConville <mmcconville at mykolab.com>
Date:	 2015-10-21 10:16 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/209a1350d87f

Description:

Assign pointers to NULL rather than 0.

diffstat:

 finch/getopt.c                                 |  6 +++---
 finch/libgnt/gnttextview.c                     |  4 ++--
 libpurple/protocols/jabber/caps.c              |  4 ++--
 libpurple/protocols/simple/simple.c            |  2 +-
 libpurple/protocols/simple/sipmsg.c            |  2 +-
 libpurple/protocols/zephyr/ZAsyncLocate.c      |  2 +-
 libpurple/protocols/zephyr/ZFlsLocs.c          |  2 +-
 libpurple/protocols/zephyr/ZFlsSubs.c          |  2 +-
 pidgin/getopt.c                                |  6 +++---
 pidgin/plugins/musicmessaging/musicmessaging.c |  2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)

diffs (160 lines):

diff --git a/finch/getopt.c b/finch/getopt.c
--- a/finch/getopt.c
+++ b/finch/getopt.c
@@ -108,7 +108,7 @@ char *alloca ();
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
-char *optarg = 0;
+char *optarg = NULL;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -327,7 +327,7 @@ int
 {
   int option_index;
 
-  optarg = 0;
+  optarg = NULL;
 
   /* Initialize the internal data when the first call is made.
      Start processing options with ARGV-element 1 (since ARGV-element 0
@@ -607,7 +607,7 @@ int
 		optind++;
 	      }
 	    else
-	      optarg = 0;
+	      optarg = NULL;
 	    nextchar = NULL;
 	  }
 	else
diff --git a/finch/libgnt/gnttextview.c b/finch/libgnt/gnttextview.c
--- a/finch/libgnt/gnttextview.c
+++ b/finch/libgnt/gnttextview.c
@@ -353,8 +353,8 @@ gnt_text_view_clicked(GntWidget *widget,
 					double_click = FALSE;
 				} else {
 					double_click = TRUE;
-					select_start = 0;
-					select_end = 0;
+					select_start = NULL;
+					select_end = NULL;
 					gnt_widget_draw(widget);
 					return TRUE;
 				}
diff --git a/libpurple/protocols/jabber/caps.c b/libpurple/protocols/jabber/caps.c
--- a/libpurple/protocols/jabber/caps.c
+++ b/libpurple/protocols/jabber/caps.c
@@ -922,8 +922,8 @@ gchar *jabber_caps_calculate_hash(Jabber
 void jabber_caps_calculate_own_hash(JabberStream *js) {
 	JabberCapsClientInfo info;
 	PurpleHash *hasher;
-	GList *iter = 0;
-	GList *features = 0;
+	GList *iter = NULL;
+	GList *features = NULL;
 
 	if (!jabber_identities && !jabber_features) {
 		/* This really shouldn't ever happen */
diff --git a/libpurple/protocols/simple/simple.c b/libpurple/protocols/simple/simple.c
--- a/libpurple/protocols/simple/simple.c
+++ b/libpurple/protocols/simple/simple.c
@@ -1478,7 +1478,7 @@ static void process_incoming_subscribe(s
 					tmp = tmp2 + 1;
 					while(*tmp == ' ') tmp++;
 				} else
-					tmp = 0;
+					tmp = NULL;
 			}
 			if(!foundpidf && foundxpidf) needsxpidf = TRUE;
 		}
diff --git a/libpurple/protocols/simple/sipmsg.c b/libpurple/protocols/simple/sipmsg.c
--- a/libpurple/protocols/simple/sipmsg.c
+++ b/libpurple/protocols/simple/sipmsg.c
@@ -96,7 +96,7 @@ struct sipmsg *sipmsg_parse_header(const
 			return NULL;
 		}
 		dummy = parts[1];
-		dummy2 = 0;
+		dummy2 = NULL;
 		while(*dummy==' ' || *dummy=='\t') dummy++;
 		dummy2 = g_strdup(dummy);
 		while(lines[i+1] && (lines[i+1][0]==' ' || lines[i+1][0]=='\t')) {
diff --git a/libpurple/protocols/zephyr/ZAsyncLocate.c b/libpurple/protocols/zephyr/ZAsyncLocate.c
--- a/libpurple/protocols/zephyr/ZAsyncLocate.c
+++ b/libpurple/protocols/zephyr/ZAsyncLocate.c
@@ -102,7 +102,7 @@ Code_t ZParseLocations(notice,zald,nlocs
       if (!__locate_list)
 	return (ENOMEM);
     } else {
-      __locate_list = 0;
+      __locate_list = NULL;
     }
 
     for (ptr=notice->z_message, i=0; i<__locate_num; i++) {
diff --git a/libpurple/protocols/zephyr/ZFlsLocs.c b/libpurple/protocols/zephyr/ZFlsLocs.c
--- a/libpurple/protocols/zephyr/ZFlsLocs.c
+++ b/libpurple/protocols/zephyr/ZFlsLocs.c
@@ -25,7 +25,7 @@ Code_t ZFlushLocations()
 
 	free((char *)__locate_list);
 
-	__locate_list = 0;
+	__locate_list = NULL;
 	__locate_num = 0;
 
 	return (ZERR_NONE);
diff --git a/libpurple/protocols/zephyr/ZFlsSubs.c b/libpurple/protocols/zephyr/ZFlsSubs.c
--- a/libpurple/protocols/zephyr/ZFlsSubs.c
+++ b/libpurple/protocols/zephyr/ZFlsSubs.c
@@ -25,7 +25,7 @@ Code_t ZFlushSubscriptions()
 
 	free((char *)__subscriptions_list);
 
-	__subscriptions_list = 0;
+	__subscriptions_list = NULL;
 	__subscriptions_num = 0;
 
 	return (ZERR_NONE);
diff --git a/pidgin/getopt.c b/pidgin/getopt.c
--- a/pidgin/getopt.c
+++ b/pidgin/getopt.c
@@ -108,7 +108,7 @@ char *alloca ();
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
-char *optarg = 0;
+char *optarg = NULL;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -327,7 +327,7 @@ int
 {
   int option_index;
 
-  optarg = 0;
+  optarg = NULL;
 
   /* Initialize the internal data when the first call is made.
      Start processing options with ARGV-element 1 (since ARGV-element 0
@@ -607,7 +607,7 @@ int
 		optind++;
 	      }
 	    else
-	      optarg = 0;
+	      optarg = NULL;
 	    nextchar = NULL;
 	  }
 	else
diff --git a/pidgin/plugins/musicmessaging/musicmessaging.c b/pidgin/plugins/musicmessaging/musicmessaging.c
--- a/pidgin/plugins/musicmessaging/musicmessaging.c
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c
@@ -403,7 +403,7 @@ intercept_received(PurpleAccount *accoun
 			}
 		}
 
-		message = 0;
+		message = NULL;
 	}
 	else if (strstr(*message, MUSICMESSAGING_START_MSG))
 	{



More information about the Commits mailing list