From: Kimmo Hämäläinen Date: Tue, 16 Mar 2010 17:55:13 +0000 (-0400) Subject: [dbus-spawn] Use correct sign values for variables X-Git-Tag: dbus-1.2.22~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e28c0ece17f0cfac1d18527604a67bcba7c3d2cc;p=platform%2Fupstream%2Fdbus.git [dbus-spawn] Use correct sign values for variables read() returns a signed value, whereas the byte count is unsigned. Signed-off-by: Colin Walters --- diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index c08f927..9105415 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -74,8 +74,8 @@ read_ints (int fd, while (TRUE) { - size_t chunk; - ssize_t to_read; + ssize_t chunk; + size_t to_read; to_read = sizeof (int) * n_ints_in_buf - bytes; @@ -129,9 +129,9 @@ read_pid (int fd, while (TRUE) { - size_t chunk; - ssize_t to_read; - + ssize_t chunk; + size_t to_read; + to_read = sizeof (pid_t) - bytes; if (to_read == 0)