httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: httpd-2.0/modules/generators mod_status.c
Date Fri, 16 Feb 2001 00:07:49 GMT
Going back to Ryan's original commit.

Why were there *any* warnings, or any errors? apr_uint32_t should be
perfectly compatible with the %ld format. Maybe it should be %lu ?

Something else is wrong here, and it isn't just time stuff.

Cheers,
-g

On Thu, Feb 15, 2001 at 12:01:35AM -0000, rbb@apache.org wrote:
> rbb         01/02/14 16:01:34
> 
>   Modified:    modules/generators mod_status.c
>   Log:
>   Remove some warnings from mod_status.
>   
>   Revision  Changes    Path
>   1.27      +7 -7      httpd-2.0/modules/generators/mod_status.c
>   
>   Index: mod_status.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
>   retrieving revision 1.26
>   retrieving revision 1.27
>   diff -u -d -b -w -u -r1.26 -r1.27
>   --- mod_status.c	2001/02/14 03:49:17	1.26
>   +++ mod_status.c	2001/02/15 00:01:32	1.27
>   @@ -182,9 +182,9 @@
>    	ap_rprintf(r, "%.1f GB", (float) kbytes / MBYTE);
>    }
>    
>   -static void show_time(request_rec *r, apr_uint32_t tsecs) 
>   +static void show_time(request_rec *r, apr_time_t tsecs) 
>    {
>   -    apr_uint32_t days, hrs, mins, secs;
>   +    apr_time_t days, hrs, mins, secs;
>        
>        secs = tsecs % 60;
>        tsecs /= 60;
>   @@ -193,13 +193,13 @@
>        hrs = tsecs % 24;
>        days = tsecs / 24;
>        if (days)
>   -	ap_rprintf(r, " %ld day%s", days, days == 1 ? "" : "s");
>   +	ap_rprintf(r, " %lld day%s", days, days == 1 ? "" : "s");
>        if (hrs)
>   -	ap_rprintf(r, " %ld hour%s", hrs, hrs == 1 ? "" : "s");
>   +	ap_rprintf(r, " %lld hour%s", hrs, hrs == 1 ? "" : "s");
>        if (mins)
>   -	ap_rprintf(r, " %ld minute%s", mins, mins == 1 ? "" : "s");
>   +	ap_rprintf(r, " %lld minute%s", mins, mins == 1 ? "" : "s");
>        if (secs)
>   -	ap_rprintf(r, " %ld second%s", secs, secs == 1 ? "" : "s");
>   +	ap_rprintf(r, " %lld second%s", secs, secs == 1 ? "" : "s");
>    }
>    
>    /* Main handler for x-httpd-status requests */
>   @@ -231,7 +231,7 @@
>    {
>        const char *loc;
>        apr_time_t nowtime = apr_time_now();
>   -    apr_uint32_t up_time;
>   +    apr_time_t up_time;
>        int j, i, res;
>        int ready = 0;
>        int busy = 0;
>   
>   
>   

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message