summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/network.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/network.c b/src/network.c
index 9837572..fc74e69 100644
--- a/src/network.c
+++ b/src/network.c
@@ -167,7 +167,8 @@ readline (int fd, char **whole_buffer)
};
struct read_lines_s *first_line, *line_ptr;
- first_line = safecalloc (sizeof (struct read_lines_s), 1);
+ first_line = (struct read_lines_s *)safecalloc (sizeof (struct read_lines_s),
+ 1);
if (!first_line)
return -ENOMEM;
@@ -180,7 +181,7 @@ readline (int fd, char **whole_buffer)
if (ret <= 0)
goto CLEANUP;
- ptr = memchr (buffer, '\n', ret);
+ ptr = (char *)memchr (buffer, '\n', ret);
if (ptr)
diff = ptr - buffer + 1;
else
@@ -198,7 +199,7 @@ readline (int fd, char **whole_buffer)
goto CLEANUP;
}
- line_ptr->data = safemalloc (diff);
+ line_ptr->data = (char *)safemalloc (diff);
if (!line_ptr->data)
{
ret = -ENOMEM;
@@ -214,7 +215,8 @@ readline (int fd, char **whole_buffer)
break;
}
- line_ptr->next = safecalloc (sizeof (struct read_lines_s), 1);
+ line_ptr->next =
+ (struct read_lines_s *)safecalloc (sizeof (struct read_lines_s), 1);
if (!line_ptr->next)
{
ret = -ENOMEM;
@@ -223,7 +225,7 @@ readline (int fd, char **whole_buffer)
line_ptr = line_ptr->next;
}
- *whole_buffer = safemalloc (whole_buffer_len + 1);
+ *whole_buffer = (char *)safemalloc (whole_buffer_len + 1);
if (!*whole_buffer)
{
ret = -ENOMEM;