diff options
Diffstat (limited to 'src/builtin/export.c')
| -rw-r--r-- | src/builtin/export.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/builtin/export.c b/src/builtin/export.c index c60d8f0..f41bcb0 100644 --- a/src/builtin/export.c +++ b/src/builtin/export.c @@ -6,7 +6,7 @@ /* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:11:34 by charles #+# #+# */ -/* Updated: 2020/06/18 13:50:47 by charles ### ########.fr */ +/* Updated: 2020/06/19 11:21:50 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ int builtin_export(char **argv, t_env env) (void)env; if (argv[1] == NULL) - return (4); + return (0); if(ft_isdigit(argv[1][0])) return(0); i = 0; @@ -36,14 +36,14 @@ int builtin_export(char **argv, t_env env) while(temp[i] != '\0') { if(temp[i] == ' ' || ft_isalnum(temp[i]) == 0) - return(2); + return(0); if (temp[i] == '=') { temp[i] = '\0'; - env_export(env, temp, argv[1][i + 1]); + env_export(env, temp, &argv[1][i + 1]); return(0); } i++; } - return (3); + return (0); } |
