|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From b748c7596f79945be5263a0d1c88de64eb0c5146 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sat, 27 Sep 2014 00:25:09 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] shutdownd: clean up initialization of struct
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
No functional change. We just don't assign the value twice.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Found by coverity. Fixes: CID#1237616 and #1237617
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/shutdownd/shutdownd.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 99aa4b32b3..0f008a6100 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/shutdownd/shutdownd.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/shutdownd/shutdownd.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -52,8 +52,8 @@ static int read_packet(int fd, union shutdown_buffer *_b) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
union shutdown_buffer b; /* We maintain our own copy here, in
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
* order not to corrupt the last message */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
struct iovec iovec = {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- iovec.iov_base = &b,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- iovec.iov_len = sizeof(b) - 1,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ .iov_base = &b,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ .iov_len = sizeof(b) - 1,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
};
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
union {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
struct cmsghdr cmsghdr;
|