diff --git a/src/database.c b/src/database.c index 670cf710..b6cff7f3 100644 --- a/src/database.c +++ b/src/database.c @@ -121,7 +121,7 @@ int db__open(struct mosquitto__config *config, struct mosquitto_db *db) db->subs = NULL; - subhier = sub__add_hier_entry(&db->subs, " ", strlen(" ")); + subhier = sub__add_hier_entry(&db->subs, "", strlen("")); if(!subhier) return MOSQ_ERR_NOMEM; subhier = sub__add_hier_entry(&db->subs, "$SYS", strlen("$SYS")); diff --git a/src/subs.c b/src/subs.c index 7b9b457c..70968c3e 100644 --- a/src/subs.c +++ b/src/subs.c @@ -183,7 +183,7 @@ static int sub__topic_tokenise(const char *subtopic, struct sub__token **topics) assert(topics); if(subtopic[0] != '$'){ - new_topic = sub__topic_append(&tail, topics, " "); + new_topic = sub__topic_append(&tail, topics, ""); if(!new_topic) goto cleanup; }