Rename swap_reset fun
This commit is contained in:
parent
ab5c1430fb
commit
1191586bf0
|
@ -6,7 +6,7 @@
|
|||
/* By: tosuman </var/spool/mail/tosuman> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/30 18:58:16 by tosuman #+# #+# */
|
||||
/* Updated: 2023/03/31 23:05:06 by tischmid ### ########.fr */
|
||||
/* Updated: 2023/04/01 02:37:23 by tischmid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -29,7 +29,7 @@ int ft_strcmp(char *s1, char *s2)
|
|||
return (*s1 - *s2);
|
||||
}
|
||||
|
||||
void swap_reset(int *counter, char **p1, char **p2)
|
||||
void swap_and_reset(int *counter, char **p1, char **p2)
|
||||
{
|
||||
char *tmp;
|
||||
|
||||
|
@ -48,7 +48,7 @@ void ft_sort_str_tab(int size, char **tab)
|
|||
while (--size)
|
||||
while (++idx < size - 1)
|
||||
if (ft_strcmp(tab[idx], tab[idx + 1]) < 0)
|
||||
swap_reset(&idx, &tab[idx], &tab[idx + 1]);
|
||||
swap_and_reset(&idx, &tab[idx], &tab[idx + 1]);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
Loading…
Reference in New Issue