aboutsummaryrefslogtreecommitdiffstats
path: root/db.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-26 18:54:24 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-26 18:54:24 +0000
commit1168964aa44ffe50af7f08aaae9fc1bbc90e7784 (patch)
treec0ffbb2fbd1dd819c7587a31da636ca6f4ae71c0 /db.c
parentdb653f9eb1553a706ec819af67d84e261df14a26 (diff)
change ast_strlen_zero to also check for the string to be defined
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6862 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'db.c')
-rwxr-xr-xdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/db.c b/db.c
index 4faac5b23..ae12909fd 100755
--- a/db.c
+++ b/db.c
@@ -400,8 +400,8 @@ struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree)
struct ast_db_entry *last = NULL;
struct ast_db_entry *cur, *ret=NULL;
- if (family && !ast_strlen_zero(family)) {
- if (keytree && !ast_strlen_zero(keytree)) {
+ if (!ast_strlen_zero(family)) {
+ if (!ast_strlen_zero(keytree)) {
/* Family and key tree */
snprintf(prefix, sizeof(prefix), "/%s/%s", family, prefix);
} else {
@@ -557,7 +557,7 @@ static int manager_dbget(struct mansession *s, struct message *m)
return 0;
}
- if (id && !ast_strlen_zero(id))
+ if (!ast_strlen_zero(id))
snprintf(idText, sizeof(idText) ,"ActionID: %s\r\n", id);
res = ast_db_get(family, key, tmp, sizeof(tmp));