summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGrant Erickson <marathon96@gmail.com>2011-07-15 10:21:31 -0700
committerMarcel Holtmann <marcel@holtmann.org>2011-07-15 22:32:28 +0200
commitef11aabba167f987b53fb5a034d8de14682b83db (patch)
tree4cf0d33f75f8d77ceb0e0f4d2e5065f67e490b76 /plugins
parentb151e66f92fe8f3dc37cc1626c12a956c312944e (diff)
downloadconnman-ef11aabba167f987b53fb5a034d8de14682b83db.tar.gz
connman-ef11aabba167f987b53fb5a034d8de14682b83db.tar.bz2
connman-ef11aabba167f987b53fb5a034d8de14682b83db.zip
loopback: Return a More Descriptive Error Code
Return a more descriptive -errno rather than -1 when we fail to create a socket.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/loopback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/loopback.c b/plugins/loopback.c
index 6cd5b85e..ba8f51ad 100644
--- a/plugins/loopback.c
+++ b/plugins/loopback.c
@@ -220,7 +220,7 @@ static int setup_loopback(void)
sk = socket(PF_INET, SOCK_DGRAM, 0);
if (sk < 0)
- return -1;
+ return -errno;
memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, "lo");