1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/daemons/clvmd
Peter Rajnoha eccc97f15a coverity: remove redundant condition
LVM2.2.02.112/daemons/clvmd/clvmd.c:1131: warning[arrayIndexOutOfBoundsCond]: Array 'row[8]' accessed at index 8, which is out of bounds. Otherwise condition 'j==8' is redundant.

This code:

int i,j = 0;
...
for (i = 0; i < len; ++i) {
	...
	if ((j == 8) || (i + 1 == len)) {
		for (;j < 8; ++j) {
			...
		}
		...
		j = 0;
	}
}

Indeed - j is 0 at the beginning, then iterating till j < 8,
then always zeroed at the end of the outer loop - so "j" never
reaching value of 8 - the j == 8 condition is redundant.
2014-11-12 09:30:02 +01:00
..
clvm.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
clvmd-cman.c coverity: fix issues reported by coverity 2014-06-24 14:58:53 +02:00
clvmd-command.c clvmd: fix test mode race 2014-04-14 12:55:46 +02:00
clvmd-common.h cleanup: set _REENTRANT in header 2014-04-18 16:38:50 +02:00
clvmd-comms.h Restart CLVMD with same cluster manager 2011-09-25 19:37:00 +00:00
clvmd-corosync.c cleanup: clvmd move destroy_lvhash into main 2014-03-21 22:29:25 +01:00
clvmd-openais.c cleanup: clvmd indent change 2014-03-21 22:29:26 +01:00
clvmd-singlenode.c cleanup: drop uneeded headers 2014-05-07 14:17:45 +02:00
clvmd.c coverity: remove redundant condition 2014-11-12 09:30:02 +01:00
clvmd.h cleanup: clvmd drop unused enum state 2014-04-14 13:02:27 +02:00
lvm-functions.c metadata: Use flags to control warnings. 2014-10-07 01:15:43 +01:00
lvm-functions.h CLVMD bugfix support for args -S -E 2011-09-24 20:48:34 +00:00
Makefile.in cleanup: set _REENTRANT in header 2014-04-18 16:38:50 +02:00
refresh_clvmd.c clmvd: fix responce status 2013-04-21 22:54:42 +02:00
refresh_clvmd.h Add -S command to clvmd, so it can restart itself and still 2010-04-20 14:07:37 +00:00