From: Job Snijders Subject: Re: rpki-client: unify proc_parser_* a bit To: Theo Buehler , tech@openbsd.org Date: Thu, 29 Aug 2024 13:38:58 +0000 OK job@ with and without Claudio's suggestion On Thu, Aug 29, 2024 at 03:15:25PM +0200, Claudio Jeker wrote: > On Thu, Aug 29, 2024 at 03:03:28PM +0200, Theo Buehler wrote: > > This is a relatively old diff that eliminates some gratuitous > > differences in the various parser functions. The cert parsing is > > still a bit special and let's not mention mfts... That can't really > > be helped. All the others can be brought to essentially the same form. > > > > There's of course lots of bikeshedding potential here. I just chose one > > option that I happen to like. > > OK claudio. > > One bikeshed comment below. > > > Index: parser.c > > =================================================================== > > RCS file: /cvs/src/usr.sbin/rpki-client/parser.c,v > > diff -u -p -r1.142 parser.c > > --- parser.c 20 Aug 2024 13:31:49 -0000 1.142 > > +++ parser.c 29 Aug 2024 10:26:41 -0000 > > @@ -165,36 +165,38 @@ static struct roa * > > proc_parser_roa(char *file, const unsigned char *der, size_t len, > > const struct entity *entp) > > { > > - struct roa *roa; > > + struct roa *roa = NULL; > > You don't really need to set roa to NULL here. It is always assigned in > the first if. I think this is also true for the other functions. > > > -- > :wq Claudio >