Re: [openssl-project] Style guide updates

2018-01-28 Thread Andy Polyakov
> Multiline conditionals, such as in an if, should be broken before the > logical connector and indented an extra tabstop.  For example: One can wonder if it would be appropriate to explicitly say that preferred way to organize multi-line conditionals with same chain condition per line even if

Re: [openssl-project] Style guide updates

2018-01-27 Thread Andy Polyakov
>> - Use size_t for sizes of things > > How do you feel about ssize_t? One has to keep in mind that ssize_t is not part of C language specification, but POSIX thing. C specification defines ptrdiff_t with [presumably] desired properties. However, there is natural ambiguity originating from fact

Re: [openssl-project] Style guide updates

2018-01-27 Thread Kurt Roeckx
On Sat, Jan 27, 2018 at 01:03:04PM +0100, Kurt Roeckx wrote: > > It's just that there seem to be 2 camps, one saying that all types > should be signed except when it's to access the bits. The other > that a size can't be negative so you go for an unsigned type. If > it's a signed type you could

Re: [openssl-project] Style guide updates

2018-01-26 Thread Andy Polyakov
> What else needs to be updated? Relax requirement that argument names in function definition has to match function declaration to permit adding 'unused_' prefix prior unused arguments. ___ openssl-project mailing list openssl-project@openssl.org

Re: [openssl-project] Style guide updates

2018-01-26 Thread Andy Polyakov
> - Don't use else after return? I'd argue against making it an absolute requirement. To give an example. You don't a problem with returns in switch, so why should it be a problem with returns from switch-like if-elseif chain? ___ openssl-project

Re: [openssl-project] Style guide updates

2018-01-26 Thread Matt Caswell
On 26/01/18 17:03, Richard Levitte wrote: > In message on Fri, 26 Jan > 2018 14:06:27 +, Matt Caswell said: > > matt> - Use size_t for sizes of things > > ... and, it seems, as array index. > Yes - because an array