Thread (88 messages) 88 messages, 13 authors, 2017-10-23

Re: char-TPM: Adjustments for ten function implementations

From: Michal Suchánek <hidden>
Date: 2017-10-18 18:27:53
Also in: linux-integrity, linuxppc-dev, lkml

On Wed, 18 Oct 2017 02:18:46 -0700
Joe Perches [off-list ref] wrote:
On Wed, 2017-10-18 at 11:00 +0200, SF Markus Elfring wrote:
quoted
quoted
The printk removals do change the objects.

The value of that type of change is only for resource limited
systems.  
I imagine that such small code adjustments are also useful for
other systems.  
Your imagination and mine differ.
Where do you _think_ it matters?

For instance, nothing about

	sizeof(type)
vs
	sizeof(*ptr)

makes it easier for a human to read the code.
However, it makes it less error-prone to modify the code.

If you do ptr = malloc(sizeof(*ptr)) and later you change the type of
the pointer the code is still correct whereas ptr = malloc(sizeof(some
type) no longer is.

That is the reason the source analysis tool warns about this usage and
you do not really need any more explanation for *this* change.

The others are not so clear.

Thanks

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