summaryrefslogtreecommitdiffstats
path: root/src/u_vars.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/u_vars.c18
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);
}