From: Patrik Flykt Date: Fri, 15 Jun 2012 11:13:46 +0000 (+0300) Subject: device: Combine multiple if statements into one block of code X-Git-Tag: 2.0_alpha~71 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fconnectivity%2Fconnman.git;a=commitdiff_plain;h=fe83d954f0a1a80e9e48008e0465edaaf0cd65ea;hp=966165f9fc59b7cb839fcad3d4b825a4eaca1033 device: Combine multiple if statements into one block of code --- diff --git a/src/device.c b/src/device.c index 9625444..d06bffd 100644 --- 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); - if (device->powered == TRUE) - __connman_technology_enabled(type); - else + if (device->powered == FALSE) { __connman_technology_disabled(type); - - if (powered == FALSE) return 0; + } + + __connman_technology_enabled(type); connman_device_set_disconnected(device, FALSE); device->scanning = FALSE;