42_minishell/libftx/extra/ft_swap.c
Camille Chauvet 6ab114eeeb fix and free
2023-02-14 07:08:25 +01:00

29 lines
244 B
C

#include "extra.h"
void ft_swap(void *a, void *b)
{
void *c;
c = a;
a = b;
b = c;
}
void ft_swap_char(char *a, char *b)
{
char c;
c = *a;
*a = *b;
*b = c;
}
void ft_swap_int(int *a, int *b)
{
int c;
c = *a;
*a = *b;
*b = c;
}