X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fproto.c;h=a0d3736a788f3a9765231ef3fcee228115728f6b;hb=55a7427b7679e25134cd43488a9f74cb542416ea;hp=c0e3927555b7ea91114b6f60e8546d31acea8cf2;hpb=abac360f324d8c881878c5d9b7fb64be93981125;p=libguestfs.git diff --git a/daemon/proto.c b/daemon/proto.c index c0e3927..a0d3736 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -24,11 +24,13 @@ #include #include #include -#include #include /* defines MIN */ #include #include +#include "c-ctype.h" +#include "ignore-value.h" + #include "daemon.h" #include "../src/guestfs_protocol.h" @@ -53,13 +55,11 @@ main_loop (int _sock) sock = _sock; for (;;) { -#if 0 /* Most common errors are leaked memory and leaked file descriptors, * so run this between each command: */ - if (verbose) - system ("ls -l /proc/self/fd"); -#endif + if (verbose && 0) + ignore_value (system ("ls -l /proc/self/fd")); /* Read the length word. */ if (xread (sock, lenbuf, 4) == -1) @@ -96,7 +96,7 @@ main_loop (int _sock) printf (" "); printf ("|"); for (j = i; j < MIN (i+16, len); ++j) - if (isprint (buf[j])) + if (c_isprint (buf[j])) printf ("%c", buf[j]); else printf (".");