Commit cec20e3d authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

reuse the fileinfo instead of concatenating twice

parent 7e98a81d
......@@ -209,10 +209,9 @@ public:
QString fdtGetValue(const QString &fdtNode)
QString fdtNodeValue;
QLatin1String fdtBase("/proc/device-tree/");
QFileInfo targetNode(fdtBase + fdtNode);
const QFileInfo targetNode(QLatin1String("/proc/device-tree/") + fdtNode);
if (targetNode.exists() && targetNode.isFile()) {
QFile fdtNodeFile(fdtBase + fdtNode);
QFile fdtNodeFile(targetNode.filePath());
if (! | QIODevice::Text)) {
qWarning("Devicetree: could not retrieve value from node %s\n", qUtf8Printable(fdtNode));
return {};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment