Re: [PATCH v2 2/2] ref-filter: add new "signature" atom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



just some nitpicks from me:

On Fri, Jun 02, 2023 at 07:41:55AM +0530, Kousik Sanagavarapu wrote:
Duplicate the code for outputting the signature and it's other

"its", not "it's". this repeats all over the place, so please look up the rules.

+static void grab_signature(struct atom_value *val, int deref, struct object *obj)
+{

+		if (!skip_prefix(name, "signature", &name) || (*name &&
+			*name != ':'))
+			continue;

this looks confusing.

but there appears to be no exception to the "no excess braces" rule for multi-line conditions, unlike for bodies - maybe there should be?

also, i would wrap logically, not right at the margin, so

	if (!skip_prefix(name, "signature", &name) ||
	    (*name && *name != ':'))

+		else if (atom->u.signature.option == S_GRADE) {

brace symmetry rule violated.

+			case 'R':
+				v->s = xstrfmt("%c", (char)sigc.result);
+			}

omitting the final 'break' looks like bad style to me.

regards,
ossi



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux