if(privatep) *privatep = private;
if(namep) *namep = name;
if(fullnamep) {
- if(shared) *fullnamep = *namep;
+ if(shared) *fullnamep = name;
else byte_xasprintf(fullnamep, "%s.%s", config->username, name);
}
}
}
if(trackdb_closecursor(cursor)) err = DB_LOCK_DEADLOCK;
cursor = 0;
+ if(err)
+ goto fail;
+ cursor = 0;
/* do a naive search over that (hopefuly fairly small) list of tracks */
u.nvec = 0;
for(n = 0; n < v.nvec; ++n) {
check_string(hex(h, sizeof h), "00ff807f");
check_string(hex(0, 0), "");
u = unhex("00ff807f", &ul);
+ insist(u != 0);
insist(ul == 4);
insist(memcmp(u, h, 4) == 0);
u = unhex("00FF807F", &ul);
+ insist(u != 0);
insist(ul == 4);
insist(memcmp(u, h, 4) == 0);
u = unhex("", &ul);
+ insist(u != 0);
insist(ul == 0);
fprintf(stderr, "2 ERROR reports expected {\n");
insist(unhex("F", 0) == 0);
const char *got = GOT; \
const char *want = WANT; \
\
- if(want == 0) { \
+ if(got == 0) { \
fprintf(stderr, "%s:%d: %s returned 0\n", \
__FILE__, __LINE__, #GOT); \
count_error(); \