aboutsummaryrefslogtreecommitdiff
path: root/utils/telldus-core/patches/970-gcc11.patch
blob: a575647d7baec46d1c4b29bb43c23548cfafade4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- a/service/SettingsConfuse.cpp
+++ b/service/SettingsConfuse.cpp
@@ -42,10 +42,10 @@ Settings::Settings(void) {
 */
 Settings::~Settings(void) {
 	TelldusCore::MutexLocker locker(&mutex);
-	if (d->cfg > 0) {
+	if (d->cfg) {
 		cfg_free(d->cfg);
 	}
-	if (d->var_cfg > 0) {
+	if (d->var_cfg) {
 		cfg_free(d->var_cfg);
 	}
 	delete d;
@@ -56,7 +56,7 @@ Settings::~Settings(void) {
 */
 std::wstring Settings::getSetting(const std::wstring &strName) const {
 	TelldusCore::MutexLocker locker(&mutex);
-	if (d->cfg > 0) {
+	if (d->cfg) {
 		std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str()));
 		return TelldusCore::charToWstring(setting.c_str());
 	}
@@ -68,7 +68,7 @@ std::wstring Settings::getSetting(const
 */
 int Settings::getNumberOfNodes(Node node) const {
 	TelldusCore::MutexLocker locker(&mutex);
-	if (d->cfg > 0) {
+	if (d->cfg) {
 		if (node == Device) {
 			return cfg_size(d->cfg, "device");
 		} else if (node == Controller) {