From: Oswald Buddenhagen Date: Fri, 02 Jun 2023 08:23:50 GMT Subject: Re: [PATCH v2 2/2] ref-filter: add new "signature" atom Message-ID: In-Reply-To: <20230602023105.17979-3-five231003@gmail.com> 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