network: Return an Error Appropriate for Function Signature
authorGrant Erickson <marathon96@gmail.com>
Mon, 2 May 2011 23:50:22 +0000 (16:50 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 3 May 2011 09:47:56 +0000 (11:47 +0200)
Currently, one of the return paths in __connman_network_set_ipconfig
returns FALSE, inconsistently with its function signature return type
of 'int'.

This patch returns the error code specified in 'ret'.

src/network.c

index e7ae5d6..123857e 100644 (file)
@@ -1176,7 +1176,7 @@ int __connman_network_set_ipconfig(struct connman_network *network,
                        if (ret != 0) {
                                connman_network_set_error(network,
                                        CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL);
-                               return FALSE;
+                               return ret;
                        }
                        break;
                case CONNMAN_IPCONFIG_METHOD_DHCP: