projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
966165f
)
device: Combine multiple if statements into one block of code
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 15 Jun 2012 11:13:46 +0000
(14:13 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 18 Jun 2012 07:59:09 +0000
(10:59 +0300)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
9625444
..
d06bffd
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-593,13
+593,12
@@
int connman_device_set_powered(struct connman_device *device,
type = __connman_device_get_service_type(device);
type = __connman_device_get_service_type(device);
- if (device->powered == TRUE)
- __connman_technology_enabled(type);
- else
+ if (device->powered == FALSE) {
__connman_technology_disabled(type);
__connman_technology_disabled(type);
-
- if (powered == FALSE)
return 0;
return 0;
+ }
+
+ __connman_technology_enabled(type);
connman_device_set_disconnected(device, FALSE);
device->scanning = FALSE;
connman_device_set_disconnected(device, FALSE);
device->scanning = FALSE;