Re: [PATCH 1/7] Rework strbuf API and semantics.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/7] Rework strbuf API and semantics.

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:33

Johannes Schindelin [off-list ref] writes:
let me thank you for this very nicely done patch series.  Except for 5/7, 
they look pretty much obvious changes to me.  I'll review that in detail 
later.

On Thu, 6 Sep 2007, Pierre Habouzit wrote:
quoted
+#define STRBUF_INIT  { 0, 0, 0, NULL }
Would not "struct strbuf sb = { 0 };" have the same effect?  (I am not so 
standards-keen as other people, who I have no doubt will gladly answer 
this one.)
AFAIR, non-specified static memory areas are initialized to zero bits,
and NULL resp (void *)0 is not guaranteed to be represented by zero
bits.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

Re: [PATCH 1/7] Rework strbuf API and semantics.

From: Jeff King <hidden>
Date: 2016-06-15 22:43:33

On Thu, Sep 06, 2007 at 04:43:36PM +0200, David Kastrup wrote:
quoted
Would not "struct strbuf sb = { 0 };" have the same effect?  (I am not so 
standards-keen as other people, who I have no doubt will gladly answer 
this one.)
AFAIR, non-specified static memory areas are initialized to zero bits,
and NULL resp (void *)0 is not guaranteed to be represented by zero
bits.
You are right that the NULL pointer is not necessarily represented as
zero bits, but static pointers are explicitly initialized to the NULL
pointer (not all-bits-zero).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help