[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0 |
Date: |
Wed, 23 May 2012 13:59:53 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
On Wed, May 23, 2012 at 12:51:48PM +0200, Mason wrote:
>
> Instead of setting several fields to 0 (sometimes using loops
> to clear arrays one byte (!!) at a time), I propose clearing
> the whole struct, and then writing only non-zero fields.
>
> Would you accept it?
>
> --- dhcp.c.orig 2012-05-14 14:10:21.578125000 +0200
> +++ dhcp.c 2012-05-23 12:35:20.880351400 +0200
> [...]
>
> + memset(dhcp->msg_out, 0, sizeof *dhcp->msg_out);
In my opinion, we should define a MEMSET and/or a BZERO macro in opt.h,
so that lwIP users can chose which function to use. With memset() we are
stuck to the libc.
Sylvain
signature.asc
Description: Digital signature
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, bayard, 2012/05/18
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/18
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/18
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Simon Goldschmidt, 2012/05/20
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, bayard, 2012/05/22
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/23
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Simon Goldschmidt, 2012/05/23
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/23
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/23
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0,
Sylvain Rochet <=
- Re: [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/23
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Mason, 2012/05/24
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, bayard, 2012/05/25
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Simon Goldschmidt, 2012/05/29
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, Simon Goldschmidt, 2012/05/29
- [lwip-devel] [bug #36492] Static Analysis on code 1.4.0, bayard, 2012/05/30