summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_strrchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_strrchr.c')
-rw-r--r--libft/src/ft_strrchr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libft/src/ft_strrchr.c b/libft/src/ft_strrchr.c
index 1ebbdc3..d9a5466 100644
--- a/libft/src/ft_strrchr.c
+++ b/libft/src/ft_strrchr.c
@@ -13,15 +13,14 @@
#include <libft.h>
#include <stddef.h>
-char
- *ft_strrchr(const char *s, int c)
+char *ft_strrchr(const char *s, int c)
{
size_t i;
i = ft_strlen(s);
while (s[i] != c)
{
- if (!i)
+ if (i == 0)
return (NULL);
i--;
}