sd->next->prev = sd;
sd->prev = NULL;
- ps_mm_debug("inserting %s(%x) into %d\n", key, sd, h);
+ ps_mm_debug("inserting %s(%p) into %d\n", key, sd, h);
data->hash[h] = sd;
ps_mm_debug("optimizing\n");
}
- ps_mm_debug(stderr, "lookup(%s): ret=%x,h=%d\n", key, ret, h);
+ ps_mm_debug(stderr, "lookup(%s): ret=%p,h=%d\n", key, ret, h);
return ret;
}
PS_OPEN_FUNC(mm)
{
- ps_mm_debug("open: ps_mm_instance=%x\n", ps_mm_instance);
+ ps_mm_debug("open: ps_mm_instance=%p\n", ps_mm_instance);
if (!ps_mm_instance)
return FAILURE;
PS_MM_DATA;
ps_sd *sd;
+ if (vallen == 0) return SUCCESS;
+
mm_lock(data->mm, MM_LOCK_RW);
sd = ps_sd_lookup(data, key, 1);