[PATCH] print format for nevents
mdounin at mdounin.ru
Wed Aug 6 16:04:53 UTC 2014
On Wed, Aug 06, 2014 at 10:22:10AM -0400, crespin wrote:
> 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.
In this particular case I think that %ui is better, as negative
numbers shouldn't be here, and logging them with %ui will make
them clearly visible as very big positive numbers. It's also what
will be used in the actual poll() syscall.
For future reference, please also take a look at the following
More information about the nginx