Re: [PATCH v2 0/8] object_id part 4
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jun 19, 2016, 08:50 UTC
- Message-ID
- <57665CC6.6070208@kdbg.org>
- In-Reply-To
- <20160618221407.1046188-1-sandals@crustytoothpaste.net>
Am 19.06.2016 um 00:13 schrieb brian m. carlson:
> * Adjust the Coccinelle patches to transform plain structs before > pointers to structs to avoid misconversions. This addresses the issue > that Peff caught originally.
To avoid future mistakes, can you write down how "transform plain structs before pointers to structs" looks like? Is it a particular order of Coccinelle rules? Which part of the interdiff between the previous round and this round makes the difference?
On a tangent, I wondered recently, why we need oidcpy() and oidclr(). After all, in place of, e.g.,
oidcpy(&pair->two->oid, &p->oid); oidclr(&one->oid);
we can write
pair->two->oid = p->oid; one->oid = null_oid;
Is there a particular reason *not* to make this transition? I find the latter less cluttered with equal clarity.
-- Hannes