diff --git a/taskbusplatform/core/process_prctl.cpp b/taskbusplatform/core/process_prctl.cpp index 5727e54619c2a5fb43743a198b4c8e1e39c51396..09a580c2cffc796da6b7e9840932df27126b9e60 100644 --- a/taskbusplatform/core/process_prctl.cpp +++ b/taskbusplatform/core/process_prctl.cpp @@ -209,7 +209,7 @@ namespace TASKBUS { ++pt; info->m_name = QString::fromLocal8Bit(pt); - return true; + return strlen(pt)>0?true:false; #endif return false; } diff --git a/taskbusplatform/watchdog/watchmemmodule.cpp b/taskbusplatform/watchdog/watchmemmodule.cpp index 0dba298a0e6ca61580859a85235bf0b7ce47fde3..84162f3c1bb9f568b95a0b52ae95e555f838e9bb 100644 --- a/taskbusplatform/watchdog/watchmemmodule.cpp +++ b/taskbusplatform/watchdog/watchmemmodule.cpp @@ -29,7 +29,7 @@ QVariant WatchMemModule::headerData(int section, Qt::Orientation orientation, in static const QString cnames[7] = {tr("PID"),tr("Name"),tr("Memory"), tr("pack_reci"),tr("pack_sent"),tr("bytes_reci"),tr("bytes_sent") }; - if (section && section<7) + if (section >=0 && section<7) return cnames[section]; } else if (orientation==Qt::Vertical)