I agree with one-line ifs FWIW...

As for the previous code, I think if the file is using separate braces, you shouldn't go around and write new code that follows the no-braces style -- which yes, we do accept.

Best regards,
Alex Ionescu

On Thu, Jul 7, 2016 at 5:25 PM, Timo Kreuzer <timo.kreuzer@web.de> wrote:

According to the "official" ReactOS coding standards, the previous code was perfectly fine.
Code like "If (Value == 0) Value = FOO;" (in one line) does not match our coding style rules. (And it's also annoying, when stepping through it with WinDbg.)
3 line comments also don't match our coding style :-P

For reference: https://reactos.org/wiki/Coding_Style

Timo



Am 05.07.2016 um 16:30 schrieb Alex Ionescu:
Coding Style - ReactOS Wiki

Stop calling them "mine".

Best regards,
Alex Ionescu

On Mon, Jul 4, 2016 at 5:38 PM, <hbelusca@svn.reactos.org> wrote:
Author: hbelusca
Date: Tue Jul  5 00:38:28 2016
New Revision: 71819

URL: http://svn.reactos.org/svn/reactos?rev=71819&view=rev
Log:
[RTL]: Follow what I guess might be Alex' coding standards.

Modified:
    trunk/reactos/sdk/lib/rtl/process.c

Modified: trunk/reactos/sdk/lib/rtl/process.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/process.c?rev=71819&r1=71818&r2=71819&view=diff
==============================================================================
--- trunk/reactos/sdk/lib/rtl/process.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/rtl/process.c [iso-8859-1] Tue Jul  5 00:38:28 2016
@@ -75,7 +75,7 @@
     PVOID BaseAddress = NULL;
     SIZE_T EnviroSize;
     SIZE_T Size;
-    PWCHAR Environment = 0;
+    PWCHAR Environment = NULL;
     DPRINT("RtlpInitEnvironment(ProcessHandle: %p, Peb: %p Params: %p)\n",
             ProcessHandle, Peb, ProcessParameters);

@@ -301,7 +301,9 @@
                                        DUPLICATE_SAME_ACCESS |
                                        DUPLICATE_SAME_ATTRIBUTES);
             if (!NT_SUCCESS(Status))
+            {
                 _SEH2_LEAVE;
+            }
         }

         if (ProcessParameters->StandardOutput)
@@ -315,7 +317,9 @@
                                        DUPLICATE_SAME_ACCESS |
                                        DUPLICATE_SAME_ATTRIBUTES);
             if (!NT_SUCCESS(Status))
+            {
                 _SEH2_LEAVE;
+            }
         }

         if (ProcessParameters->StandardError)
@@ -329,7 +333,9 @@
                                        DUPLICATE_SAME_ACCESS |
                                        DUPLICATE_SAME_ATTRIBUTES);
             if (!NT_SUCCESS(Status))
+            {
                 _SEH2_LEAVE;
+            }
         }
     }
     _SEH2_FINALLY





_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev



_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev