blob: 05032115d72dc68236e9101045ebabdf0027c024 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strjoin_free_snd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/05 22:12:56 by cacharle #+# #+# */
/* Updated: 2019/11/14 10:07:19 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
char *ft_strjoin_free_snd(char const *s1, char const *s2)
{
char *joined;
if (s1 == NULL || s2 == NULL)
return (NULL);
if ((joined = ft_strjoin(s1, s2)) == NULL)
return (NULL);
free((void*)s2);
return (joined);
}
|