poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Out of bounds check on pk_array* interface.


From: Konstantinos Chasialis
Subject: Re: [PATCH] Out of bounds check on pk_array* interface.
Date: Thu, 2 Jul 2020 22:00:57 +0300
User-agent: SquirrelMail/1.4.23 [email.uoa.gr]

> Please follow GNU coding standards:
> - In function calls, put a space between the name of the function and
>   the list of arguments.
> - Do not use a whitespace between ( and pk_array_nelem.
> - Put the beginning curly brace of a statement in its own line.
>
> Example:
>
> if (idx >= pk_uint_value (pk_array_nelem (array)))
>   {
>     bleh;
>     blah;
>   }

Noted, although I decided to remove the braces because its only 1 statement.

> If you reverse the logic in the conditional you save a return statement
> and the code is much more clear IMO:
>

You are right, I don't know what I was thinking. Done.

Attachment: 0057-Compliance-with-GNU-Standards.patch
Description: Text Data


reply via email to

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