Browse Source

[fix] libft: ft_strtrim: do not malloc return value.

Moul 4 years ago
parent
commit
c266f19b38
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ft_strtrim.c

+ 2 - 2
src/ft_strtrim.c

@@ -6,7 +6,7 @@
 /*   By: mazimi <mazimi@student.42.fr>              +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2014/11/10 18:07:47 by mazimi            #+#    #+#             */
-/*   Updated: 2014/12/05 18:03:49 by mazimi           ###   ########.fr       */
+/*   Updated: 2016/11/29 14:06:55 by mazimi           ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -26,5 +26,5 @@ char	*ft_strtrim(char const *s)
 	while (sc[i] == ' ' || sc[i] == '\n' || sc[i] == '\t')
 		i--;
 	sc[++i] = '\0';
-	return (ft_strdup(sc));
+	return (sc);
 }