From: Lukas Jiriste Date: Sat, 31 Aug 2024 16:58:10 +0000 (+0200) Subject: Fix comments and noninitialized res in categorize X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=53c4d0d0a2453372396e203a72bee2ed868aa1d6;p=42%2Fminishell.git Fix comments and noninitialized res in categorize --- diff --git a/src/token_categorize.c b/src/token_categorize.c index 6579637..39c68b7 100644 --- a/src/token_categorize.c +++ b/src/token_categorize.c @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* categorization_step.c :+: :+: :+: */ +/* token_categorize.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lnikolov vec, current_token->size) && can_expand_operator(current_token, line[*i])) res = (ft_vec_append(current_token, line + (*i)++) != success); @@ -81,8 +82,6 @@ int categorization_step(char *line, size_t *i, != success; ++*i; } - else if (current_token->size > 0) - res = ft_vec_append(current_token, line + (*i)++) != success; else res = ft_vec_append(current_token, line + (*i)++) != success; return (res); diff --git a/src/tokenization.c b/src/tokenization.c index d0ffe6e..a4e945a 100644 --- a/src/tokenization.c +++ b/src/tokenization.c @@ -6,7 +6,7 @@ /* By: lnikolov