[PATCH v6 6/6] linux ttyname and ttyname_r: Add tests
Christian Brauner
christian.brauner@mailbox.org
Sun Nov 12 17:53:00 GMT 2017
On Sun, Nov 12, 2017 at 05:23:31PM +0100, Florian Weimer wrote:
> * Christian Brauner:
>
> > Some variable declarations in the middle-of-the stack I pointed out
> > before are still left. I don't see this coding style used in the
> > codebase a lot but if people don't care and are fine with this I
> > don't care.
>
> In new code, we generally tend to reduce the scope of declarative
> regions.
Ha, ok. Thanks! I mean what I don't like is not small scopes but variable
declarations not at the beginning of a new scope. So to illustrate:
void foo()
{
int m, n, p;
/* do stuff */
if (bla)
{
/* new scope begins so it's fine to declare variable's here. */
int a, b, c;
/* do other stuff */
}
/* old scope --> Variable declarations here is what I find odd regardless
* of C standard */
int i, k, j;
}
Is the latter encouraged, Florian?
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171112/4feaea97/attachment.sig>
More information about the Libc-alpha
mailing list