lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Jun 2016 14:12:44 +0530
From:	Amitoj Kaur Chawla <amitoj1606@...il.com>
To:	tony.luck@...el.com, fenghua.yu@...el.com,
	linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	julia.lawall@...6.fr, michael.leibowitz@...el.com,
	keescook@...omium.org
Subject: [PATCH] [ACPI] Change structure initialisation to C99 style

Replace the in order struct initialisation style with explicit field
style.

The Coccinelle semantic patch used to make this change is as follows:

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>
---
 arch/ia64/kernel/acpi-ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c
index bd09bf7..31e331a 100644
--- a/arch/ia64/kernel/acpi-ext.c
+++ b/arch/ia64/kernel/acpi-ext.c
@@ -80,7 +80,7 @@ static acpi_status find_csr_space(struct acpi_resource *resource, void *data)
 
 static acpi_status hp_crs_locate(acpi_handle obj, u64 *base, u64 *length)
 {
-	struct csr_space space = { 0, 0 };
+	struct csr_space space = { .base = 0, .length = 0 };
 
 	acpi_walk_resources(obj, METHOD_NAME__CRS, find_csr_space, &space);
 	if (!space.length)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ