summaryrefslogtreecommitdiff
path: root/libopie2
authorzecke <zecke>2004-03-13 21:59:48 (UTC)
committer zecke <zecke>2004-03-13 21:59:48 (UTC)
commitee753c0009da5bec4a71d3263e9623d04dddc5c4 (patch) (side-by-side diff)
treef578536203c4277cc124d622b50f46a025cbb3f9 /libopie2
parent2eb5c075b612498c4b65f3d49389b8612612a930 (diff)
downloadopie-ee753c0009da5bec4a71d3263e9623d04dddc5c4.zip
opie-ee753c0009da5bec4a71d3263e9623d04dddc5c4.tar.gz
opie-ee753c0009da5bec4a71d3263e9623d04dddc5c4.tar.bz2
Fix possible divide by null
Patch for mickeyl...
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index ab3e77f..26a6c81 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -59,6 +59,6 @@
#include <opie2/odebugmapper.h>
-
-
-using namespace Opie::Core;
-using namespace Opie::Net::Private;
+
+
+using namespace Opie::Core;
+using namespace Opie::Net::Private;
DebugMapper* debugmapper = new DebugMapper();
@@ -70,4 +70,4 @@ DebugMapper* debugmapper = new DebugMapper();
-namespace Opie {
-namespace Net {
+namespace Opie {
+namespace Net {
ONetwork* ONetwork::_instance = 0;
@@ -1008,3 +1008,4 @@ int OWirelessNetworkInterface::signalStrength() const
- return cur*100/max;
+
+ return max != 0 ? cur*100/max: -1;
}
@@ -1245,4 +1246,4 @@ QString OOrinocoMonitoringInterface::name() const
}
-
-}
-}
+
+}
+}