Re: [PATCH v4 3/4] KVM: selftests: Add atoi_paranoid() to catch errors missed by atoi()

From: Sean Christopherson
Date: Thu Oct 06 2022 - 19:55:07 EST


On Thu, Oct 06, 2022, Vipin Sharma wrote:
> On Thu, Oct 6, 2022 at 12:58 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> >
> > On Thu, Oct 06, 2022, Vipin Sharma wrote:
> > > +int atoi_paranoid(const char *num_str)
> > > +{
> > > + int num;
> > > + char *end_ptr;
> >
> > Reverse fir-tree when it's convention:
> >
> > char *end_ptr;
> >
>
> Okay, I will do:
> char *end_ptr;
> int num;
>
> I was not aware of reverse christmas tree convention in KVM subsystem.

Oh, the above was a typo. It was supposed to be "convenient". KVM doesn't strictly
follow the almighty fir tree, but I try to use it and encourage others to do so as
it helps with continuity when switching between x86/kvm and the rest of x86/ (the
tip tree maintainers and thus most of the x86 code are devout believers).