Skip to content

Commit

Permalink
Removed unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ellzey committed Mar 7, 2013
1 parent 8ecb578 commit a7dabaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 0 additions & 9 deletions evhtp.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2322,7 +2322,6 @@ evhtp_parse_query(const char * query, size_t len) {
char * val_buf = NULL; char * val_buf = NULL;
int key_idx; int key_idx;
int val_idx; int val_idx;
int res;
unsigned char ch; unsigned char ch;
size_t i; size_t i;


Expand All @@ -2341,11 +2340,9 @@ evhtp_parse_query(const char * query, size_t len) {
val_idx = 0; val_idx = 0;


for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
res = 0;
ch = query[i]; ch = query[i];


if (key_idx >= len || val_idx >= len) { if (key_idx >= len || val_idx >= len) {
res = -1;
goto error; goto error;
} }


Expand Down Expand Up @@ -2379,7 +2376,6 @@ evhtp_parse_query(const char * query, size_t len) {
state = s_query_question_mark; state = s_query_question_mark;
break; break;
default: default:
res = -1;
goto error; goto error;
} }
break; break;
Expand All @@ -2405,7 +2401,6 @@ evhtp_parse_query(const char * query, size_t len) {
/* not hex, so we treat as a normal key */ /* not hex, so we treat as a normal key */
if ((key_idx + 2) >= len) { if ((key_idx + 2) >= len) {
/* we need to insert \%<ch>, but not enough space */ /* we need to insert \%<ch>, but not enough space */
res = -1;
goto error; goto error;
} }


Expand All @@ -2423,7 +2418,6 @@ evhtp_parse_query(const char * query, size_t len) {
break; break;
case s_query_key_hex_2: case s_query_key_hex_2:
if (!evhtp_is_hex_query_char(ch)) { if (!evhtp_is_hex_query_char(ch)) {
res = -1;
goto error; goto error;
} }


Expand Down Expand Up @@ -2465,7 +2459,6 @@ evhtp_parse_query(const char * query, size_t len) {
/* not really a hex val */ /* not really a hex val */
if ((val_idx + 2) >= len) { if ((val_idx + 2) >= len) {
/* we need to insert \%<ch>, but not enough space */ /* we need to insert \%<ch>, but not enough space */
res = -1;
goto error; goto error;
} }


Expand All @@ -2485,7 +2478,6 @@ evhtp_parse_query(const char * query, size_t len) {
break; break;
case s_query_val_hex_2: case s_query_val_hex_2:
if (!evhtp_is_hex_query_char(ch)) { if (!evhtp_is_hex_query_char(ch)) {
res = -1;
goto error; goto error;
} }


Expand All @@ -2496,7 +2488,6 @@ evhtp_parse_query(const char * query, size_t len) {
break; break;
default: default:
/* bad state */ /* bad state */
res = -1;
goto error; goto error;
} /* switch */ } /* switch */
} }
Expand Down
9 changes: 2 additions & 7 deletions evthr/evthr.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -407,20 +407,15 @@ evthr_pool_defer(evthr_pool_t * pool, evthr_cb cb, void * arg) {


/* find the thread with the smallest backlog */ /* find the thread with the smallest backlog */
TAILQ_FOREACH(thr, &pool->threads, next) { TAILQ_FOREACH(thr, &pool->threads, next) {
evthr_t * m_save; int thr_backlog = 0;
evthr_t * t_save; int min_backlog = 0;
int thr_backlog = 0;
int min_backlog = 0;


thr_backlog = evthr_get_backlog(thr); thr_backlog = evthr_get_backlog(thr);


if (min_thr) { if (min_thr) {
min_backlog = evthr_get_backlog(min_thr); min_backlog = evthr_get_backlog(min_thr);
} }


m_save = min_thr;
t_save = thr;

if (min_thr == NULL) { if (min_thr == NULL) {
min_thr = thr; min_thr = thr;
} else if (thr_backlog == 0) { } else if (thr_backlog == 0) {
Expand Down

0 comments on commit a7dabaa

Please sign in to comment.