[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] LVM2.2.02.103/tools/lvchange.c:779: bad if test ?



Hello there,

I just compiled LVM2.2.02.103 with the extra Linux gcc compiler 
flag -Wlogical-op

It said

lvchange.c:779:10: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is

                 ((tmp_str[tmp_str_len - 1] != 't') ||
                  (tmp_str[tmp_str_len - 1] != 'y') ||
                  (tmp_str[tmp_str_len - 1] != 'n'))))

Suggest swap || for &&

Regards

David Binderman 		 	   		  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]