dernier leaks disparu avec nouvelle fonction dans read_file

This commit is contained in:
Hugo LAMY
2019-06-01 15:13:08 +02:00
parent f29d9d8e60
commit 5bdc944da9
5 changed files with 40 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
/* Updated: 2019/05/29 16:10:58 by hulamy ### ########.fr */
/* Updated: 2019/06/01 15:12:03 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -36,3 +36,15 @@ char *read_file(char *file)
close(fd);
return (result);
}
/*
** Function that init num and size for search_map
*/
void init_num_and_size(int num, int *size, t_fillist *tmp)
{
while ((tmp = tmp->next))
num++;
while (*size * *size < num * 4)
(*size)++;
}