Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] print format for nevents

Maxim Dounin
August 06, 2014 12:06PM
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.

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
link:

http://nginx.org/en/docs/contributing_changes.html

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

[PATCH] print format for nevents

crespin August 06, 2014 10:22AM

Re: [PATCH] print format for nevents

Maxim Dounin August 06, 2014 12:06PM

Re: [PATCH] print format for nevents

crespin August 06, 2014 12:28PM

Re: [PATCH] print format for nevents

Maxim Dounin August 06, 2014 01:22PM

Re: [PATCH] print format for nevents

crespin August 07, 2014 09:08AM

Re: [PATCH] print format for nevents

Maxim Dounin August 10, 2014 09:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 128
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready