[PATCH] print format for nevents

crespin nginx-forum at nginx.us
Wed Aug 6 16:28:00 UTC 2014

Maxim Dounin Wrote:
> Hello!
> On Wed, Aug 06, 2014 at 10:22:10AM -0400, crespin wrote:
> > Hello,
> > 
> > nevents is an ngx_int_t, so the print format must be "%i".
> Both signed and unsigned ngx_[u]int_t has the same size, so that's 
> more about preferable representation of numbers, not about 
> correctness of the code.

Thanks for the link.

The format %d is used in another call to nevents.
To be consistent, should not use %ui ?



static ngx_int_t
ngx_poll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t
    ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
                   "poll ready %d of %d", ready, nevents);

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252365,252371#msg-252371

More information about the nginx mailing list