提交 25d68ffb 编写于 作者: W Wei Yang 提交者: Laurent Vivier

CODING_STYLE: indent example code as all others

All the example code are indented with four spaces except this one.

Fix this by adding four spaces here.
Signed-off-by: NWei Yang <richardw.yang@linux.intel.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
Reviewed-by: NStefano Garzarella <sgarzare@redhat.com>
Message-Id: <20190304071631.27567-3-richardw.yang@linux.intel.com>
Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
上级 6ac1fca4
...@@ -147,10 +147,10 @@ block to a separate function altogether. ...@@ -147,10 +147,10 @@ block to a separate function altogether.
When comparing a variable for (in)equality with a constant, list the When comparing a variable for (in)equality with a constant, list the
constant on the right, as in: constant on the right, as in:
if (a == 1) { if (a == 1) {
/* Reads like: "If a equals 1" */ /* Reads like: "If a equals 1" */
do_something(); do_something();
} }
Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read. Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read.
Besides, good compilers already warn users when '==' is mis-typed as '=', Besides, good compilers already warn users when '==' is mis-typed as '=',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册