change ast_strlen_zero to also check for the string to be defined
[asterisk/asterisk.git] / cdr.c
diff --git a/cdr.c b/cdr.c
index a6b2ce5..f65a516 100755 (executable)
--- a/cdr.c
+++ b/cdr.c
@@ -179,7 +179,7 @@ static const char *ast_cdr_getvar_internal(struct ast_cdr *cdr, const char *name
        struct ast_var_t *variables;
        struct varshead *headp;
 
-       if (!name || ast_strlen_zero(name))
+       if (ast_strlen_zero(name))
                return NULL;
 
        while (cdr) {