Cleaned the seg faults and normed the code, only

lm_mem_utils has a norm error.
This commit is contained in:
Mthandazo Ndhlovu
2019-05-06 08:05:37 +02:00
parent a40b6b00e7
commit a21860983e
14 changed files with 139 additions and 10737 deletions

View File

@@ -1,28 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/03 15:38:27 by tmaze #+# #+# */
/* Updated: 2019/04/22 10:46:05 by mndhlovu ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_strcmp(const char *s1, const char *s2)
{
int i;
int diff;
i = 1;
diff = (unsigned char)s1[0] - (unsigned char)s2[0];
while (diff == 0 && s1[i - 1] && s2[i - 1])
{
diff = (unsigned char)s1[i] - (unsigned char)s2[i];
i++;
}
return (diff);
}