[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and pote
From: |
Pär Karlsson |
Subject: |
Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings |
Date: |
Tue, 21 Oct 2014 17:55:32 +0200 |
Thanks!
It didn't even occur to me to check this out. My only excuse is gratuitous
consistency and lack of pure C experience; a malloc() without a
corresponding sizeof() seemed a little arbitrary to me, but it makes sense
now :-)
/Pär
2014-10-21 17:46 GMT+02:00 Micah Cowan <address@hidden>:
> On Mon, Oct 20, 2014 at 7:02 PM, Yousong Zhou <address@hidden>
> wrote:
> > I am not sure here. Do we always assume sizeof(char) to be 1 for
> > platforms supported by wget?
>
> FWIW, sizeof(char) is always 1 by definition; the C standard
> guarantees it. Even on systems with no addressable values smaller than
> 16 bits, because on such systems, C defines a "byte" to be 16 bits
> (recall that, originally at least, a byte isn't necessarily an octet,
> and that's the meaning the C standards use).
>
> If a platform doesn't have sizeof(char) == 1, it's not the C language. :)
>
> -mjc
>
- [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/16
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Tim Rühsen, 2014/10/17
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Giuseppe Scrivano, 2014/10/19
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/20
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/20
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Yousong Zhou, 2014/10/20
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Yousong Zhou, 2014/10/20
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Micah Cowan, 2014/10/21
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings,
Pär Karlsson <=
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Micah Cowan, 2014/10/21
Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Yousong Zhou, 2014/10/20
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/21
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Yousong Zhou, 2014/10/21
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Tim Rühsen, 2014/10/23
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/24
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Tim Rühsen, 2014/10/24
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/25
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Tim Rühsen, 2014/10/27
- Re: [Bug-wget] [PATCH] Small fix for limited number of strings (and potential garbage value) in arguments to concat_strings, Pär Karlsson, 2014/10/27