X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fclient.c;h=7ab49a98f05e9c274e3791f2ed9a4381a718fe1b;hb=e69044f7624abe5cb2cb796d528c0cc5f29515f7;hp=d3374ad4862b934c4a62df3aeeed9bf124c3698a;hpb=8cf1d92e52d3feac4ed32ec733e2c0ed7f384e86;p=mmh diff --git a/sbr/client.c b/sbr/client.c index d3374ad..7ab49a9 100644 --- a/sbr/client.c +++ b/sbr/client.c @@ -2,8 +2,6 @@ /* * client.c -- connect to a server * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -16,13 +14,7 @@ #include #include #include - -#ifdef HAVE_ARPA_INET_H -# include -#endif - -#define TRUE 1 -#define FALSE 0 +#include #define MAXARGS 1000 @@ -103,7 +95,7 @@ client (char *args, char *service, char *response, int len_response, int debug) if (connect(sd, ai->ai_addr, ai->ai_addrlen) == 0) { freeaddrinfo(res); - client_freelist(ap); + client_freelist(arguments); return sd; } @@ -117,7 +109,7 @@ client (char *args, char *service, char *response, int len_response, int debug) freeaddrinfo(res); } - client_freelist(ap); + client_freelist(arguments); strncpy (response, "no servers available", len_response); return NOTOK; } @@ -130,8 +122,7 @@ client (char *args, char *service, char *response, int len_response, int debug) static void client_freelist(char **list) { - while (*list++ != NULL) - free(*list); + free(*list); }