[PATCH 1/2] memory_driver: Use designated initializer for 'crash_dev'

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

 



Instead of using positional initialization, use the more modern
designated initializer style, as already used for 'crash_fops'.

This makes the member initialization not only less ambiguous but also
allows structure layout randomization of the underlying type (as done in
grsecurity).

Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx>
---
 memory_driver/crash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/memory_driver/crash.c b/memory_driver/crash.c
index 81bd0e5c1aec..4999ed4113b7 100644
--- a/memory_driver/crash.c
+++ b/memory_driver/crash.c
@@ -324,9 +324,9 @@ static struct file_operations crash_fops = {
 };
 
 static struct miscdevice crash_dev = {
-	MISC_DYNAMIC_MINOR,
-	"crash",
-	&crash_fops
+	.minor = MISC_DYNAMIC_MINOR,
+	.name = "crash",
+	.fops = &crash_fops
 };
 
 static int __init
-- 
2.30.2

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux