From 63e8608d87b552c690c76da0be593067840785a0 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 4 Aug 2020 15:45:22 +0200 Subject: $? fix --- src/d_define.h | 4 ++-- src/p_lcom_next.c | 2 +- src/u_vars.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/d_define.h b/src/d_define.h index f246a5b..899a2e7 100644 --- a/src/d_define.h +++ b/src/d_define.h @@ -27,8 +27,8 @@ ** ====== OPTIONS ====== */ -#define FT_OPT_INTERACT "-i" -#define FT_OPT_COMMAND "-c" +#define FT_OPT_INTERACT "-i" +#define FT_OPT_COMMAND "-c" /* ** ====== VARS ====== diff --git a/src/p_lcom_next.c b/src/p_lcom_next.c index 1df0a1f..997878e 100644 --- a/src/p_lcom_next.c +++ b/src/p_lcom_next.c @@ -36,7 +36,7 @@ static int8_t s_varname = NULL; varlen = i + 1; while ((*p_words)[varlen] != '\0' && - !ft_ischarset("$=/#@%^*+{}[],.?-", (*p_words)[varlen])) + !ft_ischarset("$=/#@%^*+{}[],.-", (*p_words)[varlen])) varlen += 1; if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen - i))) return (-1); diff --git a/src/u_vars.c b/src/u_vars.c index 4001020..2a78f3d 100644 --- a/src/u_vars.c +++ b/src/u_vars.c @@ -92,7 +92,7 @@ static char if (ft_strncmp(varname, FT_RET_VAR, 3) == 0) { - if (!(varval = ft_uitoa(msh->ret))) + if ((varval = ft_uitoa(msh->ret)) == NULL) { lcom_clear(&msh->curr); s_destroy(msh); @@ -102,7 +102,7 @@ static char } else if (ft_strncmp(varname, FT_ZER_VAR, 3) == 0) { - if (!(varval = ft_strdup(msh->shname))) + if ((varval = ft_strdup(msh->shname)) == NULL) { lcom_clear(&msh->curr); s_destroy(msh); -- cgit v1.2.3