On 07/02/2014 07:01 AM, Daniel Kolesa wrote:
> 2014-07-02 11:57 GMT+01:00 Chris Michael <devilho...@comcast.net>:
>
>> On 07/02/2014 03:17 AM, Stefan Schmidt wrote:
>>> Hello.
>>>
>>> On Tue, 2014-07-01 at 08:00, Christopher Michael wrote:
>>>> devilhorns pushed a commit to branch master.
>>>>
>>>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=e1e8859aa0d73261de6fa003bfe45959be589818
>>>>
>>>> commit e1e8859aa0d73261de6fa003bfe45959be589818
>>>> Author: Chris Michael <cp.mich...@samsung.com>
>>>> Date:   Tue Jul 1 10:58:44 2014 -0400
>>>>
>>>>       ecore-drm: Fix formatting from a7428edeb41efe67b0a
>>>>
>>>>       Fix horrible formatting before it gets too far...
>>>>       Bad Stefan, no cookie ;)
>>>
>>> :)
>>>
>>>>       Signed-off-by: Chris Michael <cp.mich...@samsung.com>
>>>> ---
>>>>    src/lib/ecore_drm/ecore_drm_output.c | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/src/lib/ecore_drm/ecore_drm_output.c
>> b/src/lib/ecore_drm/ecore_drm_output.c
>>>> index 8f10614..bf1cca6 100644
>>>> --- a/src/lib/ecore_drm/ecore_drm_output.c
>>>> +++ b/src/lib/ecore_drm/ecore_drm_output.c
>>>> @@ -216,12 +216,12 @@ _ecore_drm_output_crtc_find(Ecore_Drm_Device
>> *dev, drmModeRes *res, drmModeConne
>>>>       else
>>>>         enc = NULL;
>>>>
>>>> -   if (enc && enc->crtc_id)
>>>> +   if ((enc) && (enc->crtc_id))
>>>
>>> That is really only your taste. The braces are not needed here. Not a
>>> coding style issue. :)
>>
>> Odd, this page says otherwise ;)
>>
>> https://phab.enlightenment.org/w/coding_convention/
>>
>> "use parenthesis for every clause or math;"
>>
>> Add parenthesis around all conditions:
>>
>> if (a) ...
>> if (!a) ...
>> if ((a) && (b))...
>> if ((!a) && (b))...
>>
>>
> That's pretty silly. The only purpose of parens is to explicitly enforce
> precedence, and there is nothing to enforce here.
>

Well, it's also done for clarity when reading (ie: what the coder 
actually meant in terms of precedence) ... But I'm not arguing the case 
of "it's silly or not" ... I am simply saying "It's in the coding 
conventions" that's all :)

dh

>
>>
>>>
>>>>         {
>>>>            crtc = enc->crtc_id;
>>>>            drmModeFreeEncoder(enc);
>>>>            /* Check is this CRTC is already allocated */
>>>> -        if  (!(dev->crtc_allocator & (1 << crtc)))
>>>> +        if (!(dev->crtc_allocator & (1 << crtc)))
>>>
>>> Yeah, my bad. :)
>>>
>>
>> No Worries ;)
>>
>> dh
>>
>>> regards
>>> Stefan Schmidt
>>>
>>



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to