diff options
author | Michael Adam <obnox@samba.org> | 2009-08-07 10:10:04 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-08-07 10:10:04 +0200 |
commit | caee88c774ab689caf8c2fd81b3b5ee6fa139c92 (patch) | |
tree | 2db41c0b7d07a1e70d340303ef567ae4c44d91dc /src/network.c | |
parent | 947e8eb838dc06e6e7efbd40b7469ee825781457 (diff) |
readline(): fix 5 implicit cast warnings
Michael
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 12 |
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; |