Skip to contentSkip to conversation

master - coverity: trying different model

PATCH Zdenek Kabelac 1 participant 1 message Nov 17, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6167f5da103fe3d3619cfee1166a66b058e5b3ba
Commit:        6167f5da103fe3d3619cfee1166a66b058e5b3ba
Parent:        83661c8f7f954816284baf385fedfea4c4d57a88
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Nov 17 18:58:15 2015 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Nov 17 19:01:25 2015 +0100

coverity: trying different model

Model reseting of given set, but it still makes FD_SET to think it's accessing uninitialized value.

Maybe model also FD_SET.

---
 coverity/coverity_model.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
coverity/coverity_model.c +3 -2
index d41c67c..dfd6158 100644
@@ -66,8 +66,9 @@ void *memccpy(void *dest, const void *src, int c, size_t n)
 void model_FD_ZERO(void *fdset)
 {
 	unsigned i;
-	for (i = 0; i < 1024 / 8 / sizeof(int); ++i)
-		((int*)fdset)[i];
+
+	for (i = 0; i < 1024 / 8 / sizeof(long); ++i)
+		((long*)fdset)[i] = 0;
 }
 
 /*