diff options
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index dc8162ee1..3d7684972 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -424,7 +424,7 @@ int make_listen_port(int port) CREATE(session[fd], struct socket_data, 1);
- memset(session[fd],0,sizeof(*session[fd]));
+ malloc_set(session[fd],0,sizeof(*session[fd]));
session[fd]->func_recv = connect_client;
return fd;
@@ -502,7 +502,7 @@ int make_listen_bind(long ip,int port) CREATE(session[fd], struct socket_data, 1);
- memset(session[fd],0,sizeof(*session[fd]));
+ malloc_set(session[fd],0,sizeof(*session[fd]));
session[fd]->func_recv = connect_client;
ShowStatus("Open listen port on %d.%d.%d.%d:%i\n",
@@ -517,7 +517,7 @@ int console_recieve(int i) { char *buf;
CREATE_A(buf, char, 64);
- memset(buf,0,sizeof(64));
+ malloc_tsetdword(buf,0,sizeof(64));
n = read(0, buf , 64);
if ( n < 0 )
@@ -580,7 +580,7 @@ int start_console(void) { if (!session[0]) { // dummy socket already uses fd 0
CREATE(session[0], struct socket_data, 1);
}
- memset(session[0],0,sizeof(*session[0]));
+ malloc_set(session[0],0,sizeof(*session[0]));
session[0]->func_recv = console_recieve;
session[0]->func_console = default_console_parse;
@@ -1369,7 +1369,7 @@ void socket_init (void) session[0]->max_rdata = (int)2*rfifo_size;
session[0]->max_wdata = (int)2*wfifo_size;
- memset (func_parse_table, 0, sizeof(func_parse_table));
+ malloc_set (func_parse_table, 0, sizeof(func_parse_table));
func_parse_table[SESSION_RAW].check = default_func_check;
func_parse_table[SESSION_RAW].func = default_func_parse;
|