const size_t byteCount = evbuffer_get_length( buf );
const int vecCount = evbuffer_peek( buf, byteCount, NULL, NULL, 0 );
struct evbuffer_iovec * iovec = tr_new0( struct evbuffer_iovec, vecCount );
- const int n = evbuffer_peek( buf, byteCount, NULL, iovec, vecCount );
- assert( vecCount == n );
+ assert( vecCount == evbuffer_peek( buf, byteCount, NULL, iovec, vecCount ) );
*setme_vecCount = vecCount;
return iovec;
}
struct sockaddr *from, socklen_t fromlen,
void *sv )
{
- tr_session *ss = (tr_session*)sv;
time_t tosleep;
int rc;
- assert(tr_isSession(ss));
+ assert(tr_isSession(sv));
if(sv != session)
return;
}
static void
-event_callback(int s, short type, void *sv)
+event_callback(int s, short type UNUSED, void *sv)
{
- tr_session *ss = (tr_session*)sv;
unsigned char *buf;
struct sockaddr_storage from;
socklen_t fromlen;
int rc;
- assert(tr_isSession(ss));
+ assert(tr_isSession(sv));
assert(type == EV_READ);
buf = malloc(4096);