summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 19:01:23 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 19:01:23 +0200
commit7e767cf145623030fea5665cab91a642e2f4ac8e (patch)
tree832eb08f2ee03528e5a9bbbca1466a164de4b7b0 /src
parentgcc Makefile (diff)
download42-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 'src')
-rw-r--r--src/b_h.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/b_h.c b/src/b_h.c
index f24d5db..17e5208 100644
--- a/src/b_h.c
+++ b/src/b_h.c
@@ -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 ;