X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;ds=sidebyside;f=http%2Fhttp_blerg.c;fp=http%2Fhttp_blerg.c;h=1d272ebfbbcf7f8cbe788c9c8e3c9eece20b966e;hb=65e6e5bf86b8474d7178beb870901e2a8e9e0d17;hp=b790183b2715e9995be3c6c28d5b2a5a43b579a1;hpb=0f1372bf57d75305b70835f610f9094092b3628f;p=blerg.git diff --git a/http/http_blerg.c b/http/http_blerg.c index b790183..1d272eb 100644 --- a/http/http_blerg.c +++ b/http/http_blerg.c @@ -131,14 +131,11 @@ ssize_t GET_generate_taglist(void *cls, uint64_t pos, char *buf, size_t max) { /* Snarf one record */ b = blerg_open(ts->results[ts->i].author); - if (b == NULL) - goto skip_bad_blerg; - - json_generate_one_record(ts->g, ts->results[ts->i].author, b, ts->results[ts->i].record); - - blerg_close(b); + if (b != NULL) { + json_generate_one_record(ts->g, ts->results[ts->i].author, b, ts->results[ts->i].record); + blerg_close(b); + } -skip_bad_blerg: if (ts->i == 0) { yajl_gen_array_close(ts->g); ts->done = 1; @@ -318,7 +315,7 @@ ahc_derp (void *cls, struct MHD_Connection *connection, const char *url, const c if (!tag_exists(info.author)) return respond_404(connection); - uint64_t recs = 50; + int recs = 50; struct tag *taglist = tag_list(info.author, 0, &recs, -1); if (recs == 0) {