[evolution-patches] to sign or to unsign, that is the question... bug #179566



well, not really, but being that camel_read() (like read) returns
ssize_t, using -1 as an error return, it's kinda important to use a
signed type to capture the return value rather than an unsigned type.

following patch should fix bug #179566

Index: camel/camel-stub-marshal.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-stub-marshal.c,v
retrieving revision 1.2.8.2
diff -u -r1.2.8.2 camel-stub-marshal.c
--- camel/camel-stub-marshal.c	2 Jun 2006 19:08:35 -0000	1.2.8.2
+++ camel/camel-stub-marshal.c	15 Jun 2006 20:27:23 -0000
@@ -86,7 +86,8 @@
 static gboolean
 do_read (CamelStubMarshal *marshal, char *buf, size_t len)
 {
-	size_t n, nread = 0;
+	size_t nread = 0;
+	ssize_t n;
 	
 	do {
 		if ((n = camel_read (marshal->fd, buf + nread, len - nread)) > 0)



-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj novell com  - www.novell.com




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