[Spice-devel] [PATCH v2 06/24] Replace inefficient C-style initialization with C++-style
Christophe de Dinechin
christophe at dinechin.org
Wed Feb 21 17:46:18 UTC 2018
From: Christophe de Dinechin <dinechin at redhat.com>
Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
---
src/spice-streaming-agent.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 8508f9b..b743204 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -290,9 +290,7 @@ static void handle_interrupt(int intr)
static void register_interrupts(void)
{
- struct sigaction sa;
-
- memset(&sa, 0, sizeof(sa));
+ struct sigaction sa = { };
sa.sa_handler = handle_interrupt;
if ((sigaction(SIGINT, &sa, NULL) != 0) &&
(sigaction(SIGTERM, &sa, NULL) != 0)) {
--
2.13.5 (Apple Git-94)
More information about the Spice-devel
mailing list