[PATCH] print format for nevents

crespin nginx-forum at nginx.us
Thu Aug 7 13:08:10 UTC 2014


Hello,

here is the corresponding patch.

regards,

yves

> Yes, %d here is certainly incorrect, as int and ngx_int_t sizes 
> may differ.  I don't think there are any platforms with poll() 
> where this may cause problems, but nevertheless it's worth fixing.  
> Changing this to %ui should be ok.

# HG changeset patch
# User Yves Crespin<yves.crespin at e-quartz.fr>
# Date 1407414744 -7200
# Node ID c51d0d718b2177daaf14895840beb528e332418b
# Parent  ab48149b77a6bdbe47a8543c339cf84deeb8e341
use format %ui according to nevents type

diff -r ab48149b77a6 -r c51d0d718b21 src/event/modules/ngx_poll_module.c
--- a/src/event/modules/ngx_poll_module.c	Wed Aug 06 23:58:44 2014 +0900
+++ b/src/event/modules/ngx_poll_module.c	Thu Aug 07 14:32:24 2014 +0200
@@ -268,7 +268,7 @@
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
-                   "poll ready %d of %d", ready, nevents);
+                   "poll ready %d of %ui", ready, nevents);
 
     if (err) {
         if (err == NGX_EINTR) {

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



More information about the nginx mailing list