[PATCH 6/6] jshn.c: getenv_avl(): var->val is always not NULL
Sergey Ponomarev
stokito at gmail.com
Tue Feb 23 08:36:58 EST 2021
Signed-off-by: Sergey Ponomarev <stokito at gmail.com>
---
jshn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jshn.c b/jshn.c
index 6490fbc..979182f 100644
--- a/jshn.c
+++ b/jshn.c
@@ -170,7 +170,7 @@ static int jshn_parse(const char *str)
static char *getenv_avl(const char *key)
{
struct env_var *var = avl_find_element(&env_vars, key, var, avl);
- return var ? var->val : NULL;
+ return var->val;
}
static char *get_keys(const char *prefix)
--
2.27.0
More information about the openwrt-devel
mailing list