aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeber <beber>2006-01-17 13:26:10 +0000
committerbeber <beber>2006-01-17 13:26:10 +0000
commit5ec18760a8f240dbad3f0cefe29425b2093f02a8 (patch)
tree5e55eba5057a1fbc813b765549b839172f23ec81 /src
parent@ (diff)
downloadespik-5ec18760a8f240dbad3f0cefe29425b2093f02a8.tar.xz
no sizeof(char) for malloc
Diffstat (limited to 'src')
-rw-r--r--src/espik_common_handler.c2
-rw-r--r--src/espik_irc.c2
-rw-r--r--src/espik_net.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/espik_common_handler.c b/src/espik_common_handler.c
index cf00adf..f3d1653 100644
--- a/src/espik_common_handler.c
+++ b/src/espik_common_handler.c
@@ -49,7 +49,7 @@ int kb_get (void* data __UNUSED__, Ecore_Fd_Handler* fd_handler)
int count;
espik_enter();
- kb = malloc (sizeof (char) * 200);
+ kb = malloc (200);
do
{
diff --git a/src/espik_irc.c b/src/espik_irc.c
index 7a0141a..f0cc195 100644
--- a/src/espik_irc.c
+++ b/src/espik_irc.c
@@ -90,7 +90,7 @@ buf_t make_buffer(int len)
buf_t buf;
espik_enter();
- buf.buf = malloc (sizeof(char) * len);
+ buf.buf = malloc (len);
buf.len = len;
espik_leave();
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,