Thread (7 messages) 7 messages, 6 authors, 2019-09-26

Re: sizeof(var) vs sizeof(type), was Re: [PATCH] git: use COPY_ARRAY and MOVE_ARRAY in handle_alias()

From: Philip Oakley <hidden>
Date: 2019-09-26 15:24:04

On 26/09/2019 14:36, Derrick Stolee wrote:
quoted
quoted
Another good reason to use "sizeof(var)" instead of sizeof(type)". :)
That is indeed a very good reason, in addition to getting the type right
automatically (by virtue of letting the compiler pick it).

Should we make this an explicit guideline in our documentation?
Better yet: can we create a Coccinelle script to fix it automatically?

-Stolee
How about 'Both'. We can't assume all contributors have Coccinelle on 
their OS/system.

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