From c8d77aa6cb00044b4b09910bd52123200715b5f2 Mon Sep 17 00:00:00 2001 From: Andre MARQUEZ Date: Mon, 31 Jul 2017 11:52:15 +0200 Subject: [PATCH] silenced a few compiler errors --- libftp/src/read_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libftp/src/read_file.c b/libftp/src/read_file.c index 53915e6..1e7f81c 100644 --- a/libftp/src/read_file.c +++ b/libftp/src/read_file.c @@ -72,13 +72,14 @@ t_buffer *ft_set_buffer(char *path) size_t file_size; int fd; + buffer = NULL; if ((fd = open(path, O_RDONLY)) == -1) { perror("set_buffer"); return (NULL); } - if ((file_size = ft_file_size(fd))) + if ((file_size = ft_file_size(fd)) != 0) { /* ** get byte stream and set buffer