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:15 AM
"Fabio M. Di Nitto"
 
Default qdiskd: change variable type

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 9884ea7... d0d05f0... M cman/qdisk/disk.c
cman/qdisk/disk.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cman/qdisk/disk.c b/cman/qdisk/disk.c
index 9884ea7..d0d05f0 100644
--- a/cman/qdisk/disk.c
+++ b/cman/qdisk/disk.c
@@ -628,7 +628,8 @@ qdisk_write(target_info_t *disk, __off64_t offset, const void *buf, int count)
shared_header_t *hdrp;
void *ptr;
char *data;
- size_t total = 0, rv = -1, psz = disk->d_blksz; //sysconf(_SC_PAGESIZE);
+ size_t total = 0, psz = disk->d_blksz; //sysconf(_SC_PAGESIZE);
+ int rv = -1;

maxsize = psz - (sizeof(shared_header_t));
if (count >= (maxsize + sizeof(shared_header_t))) {
@@ -677,7 +678,7 @@ qdisk_write(target_info_t *disk, __off64_t offset, const void *buf, int count)

if (rv == -1)
logt_print(LOG_ERR, "diskRawWriteShadow");
-
+
free((char *)hdrp);
if (rv == -1)
return -1;
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 04:34 AM.

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