}
else
{
- t = store_get(sizeof(tree_node) + len + sizeof(expiring_data));
- e = (expiring_data *)((char *)t + sizeof(tree_node) + len);
+ e = store_get(sizeof(expiring_data) + sizeof(tree_node) + len);
e->expiry = do_cache == UINT_MAX ? 0 : time(NULL)+do_cache;
e->ptr = data;
+ t = (tree_node *)(e+1);
memcpy(t->name, keystring, len);
t->data.ptr = e;
tree_insertnode(&c->item_cache, t);
}
/* If nothing has been matched, but the option to look for "*@" is set, try
-replacing everthing to the left of @ by *. After a match, the wild part
+replacing everything to the left of @ by *. After a match, the wild part
is set to the string to the left of the @. */
if (yield == NULL && (starflags & SEARCH_STARAT) != 0)