X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fproto.c;h=42bc6eaa8b5aa9c5dd11105ea46441e90e25d57f;hp=131c66be128d116b1c5837db35a7dc6530c29fb0;hb=70c2ffc39677a9f5eb6b2230cb9ca2606b2fd966;hpb=d134143b55ecb5f7e6f74318acbf04f9e1370af6 diff --git a/daemon/proto.c b/daemon/proto.c index 131c66b..42bc6ea 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -25,6 +25,7 @@ #include #include #include +#include /* defines MIN */ #include #include @@ -34,7 +35,7 @@ /* XXX We should make this configurable from /proc/cmdline so that the * verbose setting of the guestfs_h can be inherited here. */ -#define DEBUG 1 +#define DEBUG 0 /* The message currently being processed. */ int proc_nr; @@ -78,8 +79,6 @@ main_loop (int _sock) #if DEBUG int i, j; -#define MIN(a,b) ((a)<(b)?(a):(b)) - for (i = 0; i < len; i += 16) { printf ("%04x: ", i); for (j = i; j < MIN (i+16, len); ++j) @@ -207,8 +206,8 @@ send_error (const char *msg) xdr_uint32_t (&xdr, &len); xdr_destroy (&xdr); - xwrite (sock, lenbuf, 4); - xwrite (sock, buf, len); + (void) xwrite (sock, lenbuf, 4); + (void) xwrite (sock, buf, len); } void @@ -248,6 +247,6 @@ reply (xdrproc_t xdrp, char *ret) xdr_uint32_t (&xdr, &len); xdr_destroy (&xdr); - xwrite (sock, lenbuf, 4); - xwrite (sock, buf, len); + (void) xwrite (sock, lenbuf, 4); + (void) xwrite (sock, buf, len); }