From 8eeadd8e5cce3fcd851857bdf1ff649a3284b4cd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Nov 2010 07:59:13 +0900 Subject: [PATCH] For consistency use err instead of ret variable name --- src/tethering.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tethering.c b/src/tethering.c index 420a3ca..35b407d 100644 --- a/src/tethering.c +++ b/src/tethering.c @@ -103,21 +103,22 @@ static int enable_ip_forward(connman_bool_t enable) static int enable_nat(const char *interface) { - int ret; + int err; if (interface == NULL) return 0; /* Enable IPv4 forwarding */ - ret = enable_ip_forward(TRUE); - if (ret < 0) - return ret; + err = enable_ip_forward(TRUE); + if (err < 0) + return err; /* TODO: Flush nat POSTROUTING chain */ /* Enable masquerading */ - ret = __connman_iptables_command("-t nat -A POSTROUTING -o %s -j MASQUERADE", interface); - if (ret < 0) - return ret; + err = __connman_iptables_command("-t nat -A POSTROUTING " + "-o %s -j MASQUERADE", interface); + if (err < 0) + return err; return __connman_iptables_commit("nat"); } -- 2.7.4