diff options
| author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-12 19:01:23 +0200 | 
|---|---|---|
| committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-12 19:01:23 +0200 | 
| commit | 7e767cf145623030fea5665cab91a642e2f4ac8e (patch) | |
| tree | 832eb08f2ee03528e5a9bbbca1466a164de4b7b0 | |
| parent | gcc Makefile (diff) | |
| download | 42-minishell-7e767cf145623030fea5665cab91a642e2f4ac8e.tar.gz 42-minishell-7e767cf145623030fea5665cab91a642e2f4ac8e.tar.bz2 42-minishell-7e767cf145623030fea5665cab91a642e2f4ac8e.tar.xz 42-minishell-7e767cf145623030fea5665cab91a642e2f4ac8e.tar.zst 42-minishell-7e767cf145623030fea5665cab91a642e2f4ac8e.zip | |
muting gcc
Diffstat (limited to '')
| -rw-r--r-- | src/b_h.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| @@ -53,7 +53,8 @@ static uint32_t	b_print_prev_history(uint64_t asked, uint64_t total, t_msh *msh)  	int64_t	to_print;  	int64_t	i; -	to_print = (total - asked < 0) ? (0) : (total - asked); +	to_print = total - asked; +	to_print = (to_print < 0) ? (0) : (to_print);  	i = 1;  	if (msh->prev_hist != NULL)  	{ @@ -79,7 +80,8 @@ static void		b_print_history(uint64_t asked, uint64_t total, t_msh *msh)  	int64_t	to_print;  	int64_t	i; -	to_print = (total - asked < 0) ? (0) : (total - asked); +	to_print = total - asked; +	to_print = (to_print < 0) ? (0) : (to_print);  	i = b_print_prev_history(asked, total, msh);  	if ((hist = ft_strdup(msh->curr_hist_ptr)) == NULL)  		return ; | 
