summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ;