masqmail

diff src/readsock.c @ 377:9bc3e47b0222

Various cleanups to remove compiler warnings. We're clean now, if we specify `-Wno-pointer-sign'.
author markus schnalke <meillo@marmaro.de>
date Sat, 14 Jan 2012 18:44:48 +0100
parents b35c17fcf69d
children
line diff
     1.1 --- a/src/readsock.c	Sat Jan 14 18:20:03 2012 +0100
     1.2 +++ b/src/readsock.c	Sat Jan 14 18:44:48 2012 +0100
     1.3 @@ -25,7 +25,6 @@
     1.4  #include <ctype.h>
     1.5  
     1.6  #include "readsock.h"
     1.7 -/*#include "masqmail.h"*/
     1.8  
     1.9  jmp_buf jmp_timeout;
    1.10  
    1.11 @@ -150,8 +149,13 @@
    1.12  		_read_chug(in);
    1.13  	}
    1.14  
    1.15 -	if (!*pbuf)
    1.16 -		*pbuf = (char *) g_malloc(size);
    1.17 +	if (!*pbuf) {
    1.18 +		*pbuf = (char *) malloc(size);
    1.19 +		if (!*pbuf) {
    1.20 +			fprintf(stderr, "Out of memory.\n");
    1.21 +			exit(1);
    1.22 +		}
    1.23 +	}
    1.24  	buf = *pbuf;
    1.25  
    1.26  	while (1) {