Message ID | 1466070465-1021-40-git-send-email-hare@suse.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 5d5441d..126a54f 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -670,7 +670,7 @@ sysfs_set_scsi_tmo (struct multipath *mpp) int dev_loss_tmo = mpp->dev_loss; if (mpp->no_path_retry > 0) { - int no_path_retry_tmo = mpp->no_path_retry * conf->checkint; + uint64_t no_path_retry_tmo = mpp->no_path_retry * conf->checkint; if (no_path_retry_tmo > MAX_DEV_LOSS_TMO) no_path_retry_tmo = MAX_DEV_LOSS_TMO;
When checking the maximum value for dev_loss_tmo we need to use a larger type, otherwise the comparison will always be false. Found by coverity. Signed-off-by: Hannes Reinecke <hare@suse.com> --- libmultipath/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)