{
const char *p = key.c_str();
if (key.length() < 2 + 8 + 4)
- return -2;
+ return -1;
p = _key_decode_shard(p, shard);
p = _key_decode_u64(p, (uint64_t*)pool);
pool -= 0x8000000000000000ull;
const char *p = key.c_str();
if (key.length() < 2 + 8 + 4)
- return -2;
+ return -1;
p = _key_decode_shard(p, &oid->shard_id);
uint64_t pool;
oid->hobj.set_bitwise_key_u32(hash);
if (*p != '.')
- return -5;
+ return -2;
++p;
r = decode_escaped(p, &oid->hobj.nspace);
if (r < 0)
- return -6;
+ return -3;
p += r + 1;
if (*p == '=') {
++p;
r = decode_escaped(p, &oid->hobj.oid.name);
if (r < 0)
- return -7;
+ return -4;
p += r + 1;
} else if (*p == '<' || *p == '>') {
// key + name
string okey;
r = decode_escaped(p, &okey);
if (r < 0)
- return -8;
+ return -5;
p += r + 1;
r = decode_escaped(p, &oid->hobj.oid.name);
if (r < 0)
- return -9;
+ return -6;
p += r + 1;
oid->hobj.set_key(okey);
} else {
// malformed
- return -10;
+ return -7;
}
p = _key_decode_u64(p, &oid->hobj.snap.val);
if (*p) {
// if we get something other than a null terminator here,
// something goes wrong.
- return -12;
+ return -8;
}
return 0;