Thread (1 message) 1 message, 1 author, 2018-10-22

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

From: Junio C Hamano <hidden>
Date: 2018-10-22 01:01:59

Michał Górny [off-list ref] writes:
quoted
Very minor point but by not using pre-increment, i.e.

		if (seen_exclusive_status++)
			goto found_duplicate_status;

you can use the expression as a "have we already seen?" boolean,
whic may probably be more idiomatic.

The patch is good in the way written as-is, and this is so minor
that it is not worth rerolling to only update this part.
Sure, thanks.  For the record, I've been taught to use pre-increment
whenever possible to avoid copying the variable but I suppose it doesn't
really matter here.  Just a habit.
Yes, it's a habit many C++ trained people spread; it just looks
weird to see a pre-increment of a "have we done this once?" variable
and end up comparing to see if it is strictly greater than 1
(i.e. have we reached 2 or more?).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help