You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Aaron Bannert <aa...@clove.org> on 2002/04/04 04:04:56 UTC
[PATCH] init type mismatch in some minor scoreboard vars?
Seems like the cast isn't necessary. There's also a potential
size mismatch between conn_bytes's declared apr_off_t (which
could be 64 bits). Is there any time that the zero wouldn't
fill the LHS?
-aaron
Index: server/scoreboard.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
retrieving revision 1.66
diff -u -u -r1.66 scoreboard.c
--- server/scoreboard.c 29 Mar 2002 14:33:50 -0000 1.66
+++ server/scoreboard.c 4 Apr 2002 02:01:32 -0000
@@ -432,8 +432,8 @@
ws->my_access_count = 0L;
ws->my_bytes_served = 0L;
}
- ws->conn_count = (unsigned short)0;
- ws->conn_bytes = (unsigned long)0;
+ ws->conn_count = 0;
+ ws->conn_bytes = 0;
}
if (r) {
conn_rec *c = r->connection;
Re: [PATCH] init type mismatch in some minor scoreboard vars?
Posted by Jeff Trawick <tr...@attglobal.net>.
Aaron Bannert <aa...@clove.org> writes:
> Seems like the cast isn't necessary. There's also a potential
> size mismatch between conn_bytes's declared apr_off_t (which
> could be 64 bits). Is there any time that the zero wouldn't
> fill the LHS?
>
> -aaron
>
> Index: server/scoreboard.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
> retrieving revision 1.66
> diff -u -u -r1.66 scoreboard.c
> --- server/scoreboard.c 29 Mar 2002 14:33:50 -0000 1.66
> +++ server/scoreboard.c 4 Apr 2002 02:01:32 -0000
> @@ -432,8 +432,8 @@
> ws->my_access_count = 0L;
> ws->my_bytes_served = 0L;
> }
> - ws->conn_count = (unsigned short)0;
> - ws->conn_bytes = (unsigned long)0;
> + ws->conn_count = 0;
> + ws->conn_bytes = 0;
+1
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: [PATCH] init type mismatch in some minor scoreboard vars?
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 08:04 PM 4/3/2002, you wrote:
>Seems like the cast isn't necessary. There's also a potential
>size mismatch between conn_bytes's declared apr_off_t (which
>could be 64 bits). Is there any time that the zero wouldn't
>fill the LHS?
any scalar (including enum) must accept 0 for an RHS assignment
without complaint.