qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions
Date: Tue, 28 Aug 2012 19:33:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

Am 28.08.2012 18:01, schrieb Michael S. Tsirkin:
> We copied HACKING from libvirt but it has some bogus stuff:
> neither underscore capital, double underscore, or underscore 't' suffixes
> are reserved in Posix/C: this appears to be based on misreading of the
> C standard. Using sane prefixes is enough to avoid conflicts.
> 
> These rules are also widely violated in our codebase,
> and it does not make sense to rework it all, apparently for
> no benefit.

It was generally not accepted to do Coding Style cleanups in the code
base so you will find lots of violations for any rule if you invest the
time to search. That's no reason to abolish any such rule.

Cc'ing malc, who has "violently" fought for this particular rule.

I also think that asking people not to introduce new ..._t typedefs is
different from asking to use appropriate existing typedefs, so HACKING
is not really contradicting itself in that aspect.

Regards,
Andreas

> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  HACKING | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/HACKING b/HACKING
> index 471cf1d..0a941fc 100644
> --- a/HACKING
> +++ b/HACKING
> @@ -69,10 +69,6 @@ it points to, or it is aliased to another pointer that is.
>  2.3. Typedefs
>  Typedefs are used to eliminate the redundant 'struct' keyword.
>  
> -2.4. Reserved namespaces in C and POSIX
> -Underscore capital, double underscore, and underscore 't' suffixes should be
> -avoided.
> -
>  3. Low level memory management
>  
>  Use of the malloc/free/realloc/calloc/valloc/memalign/posix_memalign
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]