Skip to content

Commit

Permalink
Pulling in 'make valgrind' changes before merging my free() functions.
Browse files Browse the repository at this point in the history
Merge branch 'main' of github.com:dimadem/minishell into roman_branch
  • Loading branch information
romanmikh committed Jun 11, 2024
2 parents 472cfb4 + be1c5a5 commit 010fed3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/05/30 12:57:25 by dmdemirk #+# #+# #
# Updated: 2024/06/05 18:20:02 by rmikhayl ### ########.fr #
# Updated: 2024/06/11 11:17:13 by dmdemirk ### ########.fr #
# #
# **************************************************************************** #

Expand Down Expand Up @@ -61,6 +61,7 @@ UTILS_SOURCES = $(wildcard $(UTILS_DIR)/*.c)
PARSER_SOURCES = $(wildcard $(PARSER_DIR)/*.c)
BUILTINS_SOURCES = $(wildcard $(BUILTINS_DIR)/*.c)
EXECUTE_SOURCES = $(wildcard $(EXECUTE_DIR)/*.c)

MAIN_TEST_SOURCE = $(wildcard $(TEST_DIR)/*.c)
ENV_TEST_SOURCES = $(wildcard $(TEST_DIR)/env/*.c)

Expand Down Expand Up @@ -145,6 +146,7 @@ bonus: $(NAME)

clean:
@$(RM) $(BUILD_DIR)
@$(RM) valgrind-out.txt
@cd $(LIB_DIR)/libft && make clean
@echo "$(GRAY)files.o removed$(DEF_COLOR)"

Expand Down Expand Up @@ -173,4 +175,7 @@ test: $(TEST_OBJECTS) $(LIBFT)
@echo "$(GRAY)running tests$(DEF_COLOR)"
@./test

valgrind: $(NAME)
@valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt ./minishell

.PHONY: all bonus clean fclean re test
4 changes: 2 additions & 2 deletions src/execute/execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ int new_process(t_minishell_data *data);
int execute(t_minishell_data *data)
{
size_t i;
char *builtin_commands[5];
int (*builtin_functions[5])(t_minishell_data *);
char *builtin_commands[4];
int (*builtin_functions[4])(t_minishell_data *);

builtin_commands[0] = "cd";
builtin_commands[1] = "echo";
Expand Down

0 comments on commit 010fed3

Please sign in to comment.