diff options
author | beber <beber> | 2006-01-17 13:26:10 +0000 |
---|---|---|
committer | beber <beber> | 2006-01-17 13:26:10 +0000 |
commit | 5ec18760a8f240dbad3f0cefe29425b2093f02a8 (patch) | |
tree | 5e55eba5057a1fbc813b765549b839172f23ec81 /src/espik_net.c | |
parent | @ (diff) | |
download | espik-5ec18760a8f240dbad3f0cefe29425b2093f02a8.tar.xz |
no sizeof(char) for malloc
Diffstat (limited to '')
-rw-r--r-- | src/espik_net.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/espik_net.c b/src/espik_net.c index d1d20bb..d682c7e 100644 --- a/src/espik_net.c +++ b/src/espik_net.c @@ -16,7 +16,7 @@ typedef int (*Handler_Func) (void* data, int ev_type, void* ev); -static int ret; /* For debug */ +static int ret; /* For debug */ char connected = 0; Ecore_Con_Server* con_sock; @@ -77,11 +77,11 @@ void espik_con_up() char *tmp, *tmp2; - tmp = malloc (sizeof(char)*(strlen("NICK ") - + strlen (a_infos.client->nickname))); - tmp2 = malloc (sizeof(char)*(strlen("USER localhost:") + tmp = malloc (strlen("NICK ") + + strlen (a_infos.client->nickname)); + tmp2 = malloc (strlen("USER localhost:") + strlen(a_infos.client->nickname)*2 - + strlen (a_infos.client->realname))); + + strlen (a_infos.client->realname)); sprintf (tmp, "NICK %s", a_infos.client->nickname); sprintf (tmp2, "USER %s %s localhost: %s", a_infos.client->nickname, |