Commit d41c7d02 authored by David Dykstra's avatar David Dykstra

Use MAXHOSTNAMELEN (256) for the array holding the host_name in socket.c

instead of 200.  Move the defines of True and False to rsync.h.  Eliminate
the defines of BOOL in loadparm.c and params.c because it is already
defined in rsync.h.  Changes suggested by Roman Gollent roman.gollent@wdr.com
parent b86f0cef
......@@ -44,9 +44,6 @@
*/
#include "rsync.h"
#define BOOL int
#define False 0
#define True 1
#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((char *)(p1)) - (char *)(p2)))
#define strequal(a,b) (strcasecmp(a,b)==0)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
......
......@@ -74,9 +74,6 @@
*/
#include "rsync.h"
#define BOOL int
#define False 0
#define True 1
/* -------------------------------------------------------------------------- **
* Constants...
......
......@@ -17,6 +17,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define False 0
#define True 1
#define BLOCK_SIZE 700
#define RSYNC_RSH_ENV "RSYNC_RSH"
......@@ -270,6 +273,10 @@
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
/* the length of the md4 checksum */
#define MD4_SUM_LENGTH 16
#define SUM_LENGTH 16
......
......@@ -67,7 +67,7 @@ static int open_socket_in(int type, int port)
{
struct hostent *hp;
struct sockaddr_in sock;
char host_name[200];
char host_name[MAXHOSTNAMELEN];
int res;
int one=1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment