mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
comms/telldus-core: unbreak with clang 4.0
service/SettingsConfuse.cpp:47:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int') if (d->cfg > 0) { ~~~~~~ ^ ~ service/SettingsConfuse.cpp:50:17: error: ordered comparison between pointer and zero ('cfg_t *' and 'int') if (d->var_cfg > 0) { ~~~~~~~~~~ ^ ~ service/SettingsConfuse.cpp:61:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int') if (d->cfg > 0) { ~~~~~~ ^ ~ service/SettingsConfuse.cpp:73:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int') if (d->cfg > 0) { ~~~~~~ ^ ~ PR: 216052 Submitted by: Johan Ström (maintainer)
This commit is contained in:
parent
18003ee998
commit
1b36bdb11d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431828
@ -9,3 +9,34 @@
|
||||
cfg_t *cfg;
|
||||
cfg_t *var_cfg;
|
||||
};
|
||||
@@ -42,10 +44,10 @@
|
||||
*/
|
||||
Settings::~Settings(void) {
|
||||
TelldusCore::MutexLocker locker(&mutex);
|
||||
- if (d->cfg > 0) {
|
||||
+ if (d->cfg != 0) {
|
||||
cfg_free(d->cfg);
|
||||
}
|
||||
- if (d->var_cfg > 0) {
|
||||
+ if (d->var_cfg != 0) {
|
||||
cfg_free(d->var_cfg);
|
||||
}
|
||||
delete d;
|
||||
@@ -56,7 +58,7 @@
|
||||
*/
|
||||
std::wstring Settings::getSetting(const std::wstring &strName) const {
|
||||
TelldusCore::MutexLocker locker(&mutex);
|
||||
- if (d->cfg > 0) {
|
||||
+ if (d->cfg != 0) {
|
||||
std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str()));
|
||||
return TelldusCore::charToWstring(setting.c_str());
|
||||
}
|
||||
@@ -68,7 +70,7 @@
|
||||
*/
|
||||
int Settings::getNumberOfNodes(Node node) const {
|
||||
TelldusCore::MutexLocker locker(&mutex);
|
||||
- if (d->cfg > 0) {
|
||||
+ if (d->cfg != 0) {
|
||||
if (node == Device) {
|
||||
return cfg_size(d->cfg, "device");
|
||||
} else if (node == Controller) {
|
||||
|
Loading…
Reference in New Issue
Block a user