X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=fish%2Frc.c;h=5423c22725b9f02b95cc1759425f6d2762ce3d48;hb=de81a7d930a6a2ad558eff9396da20237e06ccc1;hp=e88716c7a0d16f239484b656dd78bd2fbf2739c5;hpb=2f1a50d81671810256dce0852e6b1e0810ac44af;p=libguestfs.git diff --git a/fish/rc.c b/fish/rc.c index e88716c..5423c22 100644 --- a/fish/rc.c +++ b/fish/rc.c @@ -34,8 +34,6 @@ #include "fish.h" #include "rc_protocol.h" -#define UNIX_PATH_MAX 108 - static void create_sockpath (pid_t pid, char *sockpath, int len, struct sockaddr_un *addr) { @@ -235,8 +233,8 @@ rc_remote (int pid, const char *cmd, int argc, char *argv[], if (!xdr_guestfish_hello (&xdr, &hello)) { fprintf (stderr, _("guestfish: protocol error: could not send initial greeting to server\n")); - fclose (fp); xdr_destroy (&xdr); + fclose (fp); return -1; } @@ -249,8 +247,8 @@ rc_remote (int pid, const char *cmd, int argc, char *argv[], call.exit_on_error = exit_on_error; if (!xdr_guestfish_call (&xdr, &call)) { fprintf (stderr, _("guestfish: protocol error: could not send initial greeting to server\n")); - fclose (fp); xdr_destroy (&xdr); + fclose (fp); return -1; } xdr_destroy (&xdr); @@ -260,13 +258,13 @@ rc_remote (int pid, const char *cmd, int argc, char *argv[], if (!xdr_guestfish_reply (&xdr, &reply)) { fprintf (stderr, _("guestfish: protocol error: could not decode reply from server\n")); - fclose (fp); xdr_destroy (&xdr); + fclose (fp); return -1; } - fclose (fp); xdr_destroy (&xdr); + fclose (fp); return reply.r; }