Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
dormando committed Apr 22, 2024
1 parent 7cebb9a commit e394b74
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions proxy_lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ struct _mcplib_statctx_s {
static void _mcplib_append_stats(const char *key, const uint16_t klen,
const char *val, const uint32_t vlen,
const void *cookie) {
if (klen == 0 && vlen > 0) {
return;
}
if (klen == 0 && vlen == 0) {
// END isn't necessary for the lua API since we're using a table.
// k + v == 0 means END, but we don't use END for this lua API.
if (klen == 0) {
return;
}

Expand All @@ -37,10 +34,7 @@ static void _mcplib_append_section_stats(const char *key, const uint16_t klen,
const void *cookie) {
char stat[STAT_KEY_LEN];
long section = 0;
if (klen == 0 && vlen > 0) {
return;
}
if (klen == 0 && vlen == 0) {
if (klen == 0) {
return;
}

Expand Down

0 comments on commit e394b74

Please sign in to comment.