diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-15 19:59:41 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-15 19:59:41 +0200 |
commit | ca2e36781039eb7e9901ccde395600e7af87ff4f (patch) | |
tree | 8a9d85433e943fbbd079bc55700e048a54d9bf24 /src/u_vars.c | |
parent | type builtin fix (diff) | |
download | 42-minishell-ca2e36781039eb7e9901ccde395600e7af87ff4f.tar.gz 42-minishell-ca2e36781039eb7e9901ccde395600e7af87ff4f.tar.bz2 42-minishell-ca2e36781039eb7e9901ccde395600e7af87ff4f.tar.xz 42-minishell-ca2e36781039eb7e9901ccde395600e7af87ff4f.tar.zst 42-minishell-ca2e36781039eb7e9901ccde395600e7af87ff4f.zip |
Huge fixes and stack stuff
Diffstat (limited to '')
-rw-r--r-- | src/u_vars.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/u_vars.c b/src/u_vars.c index 95c6ffa..97fc580 100644 --- a/src/u_vars.c +++ b/src/u_vars.c @@ -98,22 +98,26 @@ void ** varname[] wasn't found. */ -void - u_get_var_value(char str[], - const char varname[], - size_t dstsize, - t_msh *msh) +uint8_t u_get_var_value(char str[], + const char varname[], + size_t dstsize, + t_msh *msh) { str[0] = C_NUL; u_get_special_var(str, varname, dstsize, msh); if (str[0] != C_NUL) { - return ; + return (0); } u_get_custom_var(str, varname, dstsize, msh); if (str[0] != C_NUL) { - return ; + return (0); } u_get_frm_env(str, varname, dstsize, msh); + if (str[0] != C_NUL) + { + return (0); + } + return (1); } |