Johannes Schindelin [off-list ref] writes:
quoted
xpparam_t xpparam;
+
+ memset(&xpparam, 0, sizeof(xpparam));
A slightly more elegant way to do this would be
xpparam_t xpparam = { 0l };
Or even
xpparam_t xpparam = XPPARAM_T_INIT;
with
#define XPPARAM_T_INIT { 0l, NULL, 0 }
in `xdiff/xdiff.h`.
Let's not suggest any of the above.
I think we had a recent thread [*1*] on which we agreed that "{ 0 }"
is the way to spell "a naturally zero" initialization like this one,
if we were to spell it out.
TBH, I'd say that memset() is also OK as-is in this codebase as an
established way (git grep 'memset([^,]*, 0, sizeof' gives too many
hits).
Thanks.
[Reference]
*1* https://lore.kernel.org/git/xmqq4knca7c6.fsf@gitster.c.googlers.com/ (local)