Skip to content

Commit

Permalink
silenced a few compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre MARQUEZ committed Jul 31, 2017
1 parent 39dc71f commit c8d77aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libftp/src/read_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8d77aa

Please sign in to comment.