[Commits] utils.c 1.36.2.200 1.36.2.201

colin at claws-mail.org colin at claws-mail.org
Wed Sep 12 11:23:15 CEST 2012


Update of /home/claws-mail/claws/src/common
In directory srv:/tmp/cvs-serv1241/src/common

Modified Files:
      Tag: gtk2
	utils.c 
Log Message:
2012-09-12 [colin]	3.8.1cvs52

	* src/addressbook.c
	* src/addrharvest.c
	* src/addrindex.c
	* src/addritem.c
	* src/compose.c
	* src/edittags.c
	* src/folder.c
	* src/imap.c
	* src/inc.c
	* src/ldif.c
	* src/mainwindow.c
	* src/mbox.c
	* src/mimeview.c
	* src/mutt.c
	* src/partial_download.c
	* src/prefs_filtering_action.c
	* src/prefs_toolbar.c
	* src/printing.c
	* src/procheader.c
	* src/procmime.c
	* src/procmsg.c
	* src/summaryview.c
	* src/textview.c
	* src/common/utils.c
	* src/etpan/imap-thread.c
	* src/gtk/gtkaspell.c
	* src/plugins/pgpcore/sgpgme.c
		More fixes from bug #1961:
		- Write-only variables
		- Null pointer dereferences
		- A couple other fixes for which the reporter
		  was unsure, but which showed problems.
		More details in bug #1961 comments.

Index: utils.c
===================================================================
RCS file: /home/claws-mail/claws/src/common/utils.c,v
retrieving revision 1.36.2.200
retrieving revision 1.36.2.201
diff -u -d -r1.36.2.200 -r1.36.2.201
--- utils.c	7 Jul 2012 07:09:32 -0000	1.36.2.200
+++ utils.c	12 Sep 2012 09:23:13 -0000	1.36.2.201
@@ -706,7 +706,7 @@
 	register gchar *srcp, *destp;
 	gint in_brace;
 
-	srcp = destp = str;
+	destp = str;
 
 	while ((destp = strchr(destp, op))) {
 		in_brace = 1;
@@ -730,7 +730,7 @@
 	register gchar *srcp, *destp;
 	gint in_brace;
 
-	srcp = destp = str;
+	destp = str;
 
 	while ((srcp = strchr(destp, op))) {
 		if (destp > str)
@@ -759,7 +759,7 @@
 	gint in_brace;
 	gboolean in_quote = FALSE;
 
-	srcp = destp = str;
+	destp = str;
 
 	while ((srcp = strchr_with_skip_quote(destp, quote_chr, op))) {
 		if (destp > str)
@@ -805,7 +805,7 @@
 	register gchar *srcp, *destp;
 	gint in_brace;
 
-	srcp = destp = str;
+	destp = str;
 
 	while ((destp = strchr(destp, '"'))) {
 		if ((srcp = strchr(destp + 1, '"'))) {
@@ -822,7 +822,7 @@
 		}
 	}
 
-	srcp = destp = str;
+	destp = str;
 
 	while ((destp = strchr_with_skip_quote(destp, '"', '('))) {
 		in_brace = 1;
@@ -2886,7 +2886,7 @@
 
 gchar *normalize_newlines(const gchar *str)
 {
-	const gchar *p = str;
+	const gchar *p;
 	gchar *out, *outp;
 
 	out = outp = g_malloc(strlen(str) + 1);
@@ -4021,7 +4021,7 @@
 	INT_TO_HEX(hex, ch >> 4);
 	*out++ = hex;
 	INT_TO_HEX(hex, ch & 0x0f);
-	*out++ = hex;
+	*out   = hex;
 }
 
 #undef REF_DEBUG
@@ -5250,7 +5250,7 @@
 			*curpos++ = *format++; 
 		}
 	}
-	*curpos++ = '\0';
+	*curpos = '\0';
 	return total_done;
 }
 



More information about the Commits mailing list