[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qom: Fix "typddef" typo
From: |
Eduardo Habkost |
Subject: |
Re: [PATCH] qom: Fix "typddef" typo |
Date: |
Tue, 13 Oct 2020 09:16:28 -0400 |
On Mon, Oct 12, 2020 at 03:45:12PM +0100, Daniel P. Berrangé wrote:
> On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote:
> > Fix typo introduced in the C11 #ifdef for qemu_max_align_t. It
> > never caused any problems because we always compile using
> > -std=gnu99.
> >
> > Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased
> > alignment")
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> > qom/object.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/qom/object.c b/qom/object.c
> > index c335dce7e4..125dabd28b 100644
> > --- a/qom/object.c
> > +++ b/qom/object.c
> > @@ -692,7 +692,7 @@ static void object_finalize(void *data)
> >
> > /* Find the minimum alignment guaranteed by the system malloc. */
> > #if __STDC_VERSION__ >= 201112L
> > -typddef max_align_t qemu_max_align_t;
> > +typedef max_align_t qemu_max_align_t;
> > #else
>
> Why do we need / have this first part of the #if at all ? We
> unconditionally add -std=gnu99, so surely this has always
> been dead code and can just be better deleted.
It has the same function as a comment saying "we can use
max_align_t as soon as we move to C11". The difference is that
it doesn't need us to manually change the code once we do.
--
Eduardo