Chris Lalancette
2008-Sep-02 08:37 UTC
[Ovirt-devel] [PATCH]: Minor cleanup of DEBUG statements in ovirt-identify-node
Compiling ovirt-identify-node on x86_64 results in a warning about size_t; this patch fixes them up so it will work on both i386 and x86_64.
Chris Lalancette
2008-Sep-02 08:37 UTC
[Ovirt-devel] [PATCH]: Minor cleanup of DEBUG statements in ovirt-identify-node
Minor cleanup of the DEBUG print statements in ovirt-identify-node.
Signed-off-by: Chris Lalancette <clalance at redhat.com>
diff --git a/ovirt-managed-node/ovirt-identify-node/comm.c
b/ovirt-managed-node/ovirt-identify-node/comm.c
index 16dc3b8..ee5e174 100644
--- a/ovirt-managed-node/ovirt-identify-node/comm.c
+++ b/ovirt-managed-node/ovirt-identify-node/comm.c
@@ -35,14 +35,14 @@ saferead(int fd, char *buf, size_t count)
len_left = count;
- DEBUG("Begin saferead(%d, %p, %d)\n", fd, buf, count);
+ DEBUG("Begin saferead(%d, %p, %zd)\n", fd, buf, count);
while (!done) {
DEBUG("Before read(%d,%p,%d)\n", fd, buf + offset, len_left);
bytes = read(fd, buf + offset, len_left);
- DEBUG("After read: bytes=%d\n", bytes);
+ DEBUG("After read: bytes=%zd\n", bytes);
if (bytes == 0) {
done = 1;
@@ -56,7 +56,7 @@ saferead(int fd, char *buf, size_t count)
done = 1;
}
- DEBUG("End of decision loop: offset=%d, len_left=%dl,
done=%d\n",
+ DEBUG("End of decision loop: offset=%zd, len_left=%dl,
done=%d\n",
offset, len_left, done);
}