FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:16 AM
"Fabio M. Di Nitto"
 
Default qdiskd: fix more uninizialized values

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 7c6e114... ec47a5f... M cman/qdisk/disk.c
cman/qdisk/disk.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/cman/qdisk/disk.c b/cman/qdisk/disk.c
index 7c6e114..ec47a5f 100644
--- a/cman/qdisk/disk.c
+++ b/cman/qdisk/disk.c
@@ -756,19 +756,10 @@ qdisk_init(char *partname, char *label)

time(&t);

+ memset(&ps, 0, sizeof(status_block_t));
+
ps.ps_magic = STATE_MAGIC_NUMBER;
- ps.ps_updatenode = 0;
- ps.pad0 = 0;
ps.ps_timestamp = (uint64_t)t;
- ps.ps_state = (uint8_t)S_NONE;
- ps.pad1[0] = 0;
- ps.ps_flags = 0;
- ps.ps_score = 0;
- ps.ps_scoremax = 0;
- ps.ps_ca_sec = 0;
- ps.ps_ca_usec = 0;
- ps.ps_lc_sec = 0;
- ps.ps_ca_usec = 0;

/* Node IDs 1..N */
for (nid = 1; nid <= MAX_NODES_DISK; nid++) {
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 07:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org