From e28c0ece17f0cfac1d18527604a67bcba7c3d2cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kimmo=20H=C3=A4m=C3=A4l=C3=A4inen?= Date: Tue, 16 Mar 2010 13:55:13 -0400 Subject: [PATCH] [dbus-spawn] Use correct sign values for variables read() returns a signed value, whereas the byte count is unsigned. Signed-off-by: Colin Walters --- dbus/dbus-spawn.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) -- 2.7.4