From 7c901593b270ae51d6150639bb4d2690902c0cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 5 Feb 2017 15:50:40 +0000 Subject: [PATCH] Use slightly more descriptive variable names. --- src/fs/lvm2_pv.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fs/lvm2_pv.cpp b/src/fs/lvm2_pv.cpp index cf074f4..f92e6f2 100644 --- a/src/fs/lvm2_pv.cpp +++ b/src/fs/lvm2_pv.cpp @@ -104,9 +104,9 @@ qint64 lvm2_pv::maxCapacity() const qint64 lvm2_pv::readUsedCapacity(const QString& deviceNode) const { - QString val = getpvField(QStringLiteral("pv_used"), deviceNode); + QString pvUsed = getpvField(QStringLiteral("pv_used"), deviceNode); QString metadataOffset = getpvField(QStringLiteral("pe_start"), deviceNode); - return val.isEmpty() ? -1 : val.toLongLong() + metadataOffset.toLongLong(); + return pvUsed.isEmpty() ? -1 : pvUsed.toLongLong() + metadataOffset.toLongLong(); } bool lvm2_pv::check(Report& report, const QString& deviceNode) const @@ -206,20 +206,20 @@ bool lvm2_pv::canUnmount(const QString& deviceNode) const qint64 lvm2_pv::getTotalPE(const QString& deviceNode) { - QString val = getpvField(QStringLiteral("pv_pe_count"), deviceNode); - return val.isEmpty() ? -1 : val.toLongLong(); + QString pvPeCount = getpvField(QStringLiteral("pv_pe_count"), deviceNode); + return pvPeCount.isEmpty() ? -1 : pvPeCount.toLongLong(); } qint64 lvm2_pv::getAllocatedPE(const QString& deviceNode) { - QString val = getpvField(QStringLiteral("pv_pe_alloc_count"), deviceNode); - return val.isEmpty() ? -1 : val.toLongLong(); + QString pvPeAllocCount = getpvField(QStringLiteral("pv_pe_alloc_count"), deviceNode); + return pvPeAllocCount.isEmpty() ? -1 : pvPeAllocCount.toLongLong(); } void lvm2_pv::getPESize(const QString& deviceNode) { - QString val = getpvField(QStringLiteral("vg_extent_size"), deviceNode); - m_PESize = val.isEmpty() ? -1 : val.toLongLong(); + QString vgExtentSize = getpvField(QStringLiteral("vg_extent_size"), deviceNode); + m_PESize = vgExtentSize.isEmpty() ? -1 : vgExtentSize.toLongLong(); } /** Get pvs command output with field name