Re: [Evolution-hackers] Merging camel-mime-utils.c, question



it probably makes more sense to check *inptr first tho I'm not sure if it will actually make a difference.

Jeff

>>> Philip Van Hoof <spam pvanhoof be> 12/24/07 8:35 AM >>>
While I was merging camel-lite with camel upstream I noticed this one in
camel-mime-utils.c:

@@ -2110,7 +2105,7 @@
 			domain = g_string_append_c(domain, '[');
 			inptr++;
 			header_decode_lwsp(&inptr);
-			while (*inptr && camel_mime_is_dtext(*inptr)) {
+			while (camel_mime_is_dtext(*inptr) && *inptr) {
 				domain = g_string_append_c(domain, *inptr);
 				inptr++;
 			}

I wonder which one is the most correct. It looks to me that first doing
something with *inptr and then testing whether it was NULL doesn't make
as much sense as first testing and then doing something.

So I kinda forgot whether I made this change as a result of a bugfix or
whether somebody upstream made the swap (I think I did it as a bugfix).


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be




_______________________________________________
Evolution-hackers mailing list
Evolution-hackers gnome org
http://mail.gnome.org/mailman/listinfo/evolution-hackers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]