diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index 60b317c39..b823dfd6d 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -318,9 +318,10 @@ read_pipe_then_close( CommonGlobals* cGlobals, const TransportProcs* procs ) /* 0-length packet closes it off */ XP_LOGF( "%s: writing 0-length packet", __func__ ); len = 0; +#ifdef DEBUG ssize_t nwritten = write( fd, &len, sizeof(len) ); XP_ASSERT( nwritten == sizeof(len) ); - +#endif close( fd ); } diff --git a/xwords4/linux/xptypes.h b/xwords4/linux/xptypes.h index 5aa150573..03baa755a 100644 --- a/xwords4/linux/xptypes.h +++ b/xwords4/linux/xptypes.h @@ -90,6 +90,7 @@ extern void linux_debugf(const char*, ...) #else # define XP_MALLOC(pool,nbytes) malloc(nbytes) +# define XP_CALLOC(pool,nbytes) calloc(1,nbytes) # define XP_REALLOC(pool,p,s) realloc((p),(s)) # define XP_FREE(pool,p) free(p) void linux_freep( void** ptrp );