[source] dnsmasq: clean up white space in dnsmasq.init
LEDE Commits
lede-commits at lists.infradead.org
Thu Jan 5 13:51:50 PST 2017
dedeckeh pushed a commit to source.git, branch master:
https://git.lede-project.org/06e26363d89788b536e5f2317ec19288c4f6b805
commit 06e26363d89788b536e5f2317ec19288c4f6b805
Author: Eric Luehrsen <ericluehrsen at hotmail.com>
AuthorDate: Thu Dec 22 13:24:12 2016 -0500
dnsmasq: clean up white space in dnsmasq.init
Signed-off-by: Eric Luehrsen <ericluehrsen at hotmail.com>
---
.../network/services/dnsmasq/files/dnsmasq.init | 32 +++++++++++-----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 45fc29e..46607df 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -23,22 +23,22 @@ xappend() {
}
hex_to_hostid() {
- local var="$1"
- local hex="${2#0x}" # strip optional "0x" prefix
-
- if [ -n "${hex//[0-9a-fA-F]/}" ]; then
- # is invalid hex literal
- return 1
- fi
-
- # convert into host id
- export "$var=$(
- printf "%0x:%0x" \
- $(((0x$hex >> 16) % 65536)) \
- $(( 0x$hex % 65536))
- )"
-
- return 0
+ local var="$1"
+ local hex="${2#0x}" # strip optional "0x" prefix
+
+ if [ -n "${hex//[0-9a-fA-F]/}" ]; then
+ # is invalid hex literal
+ return 1
+ fi
+
+ # convert into host id
+ export "$var=$(
+ printf "%0x:%0x" \
+ $(((0x$hex >> 16) % 65536)) \
+ $(( 0x$hex % 65536))
+ )"
+
+ return 0
}
dhcp_calc() {
More information about the lede-commits
mailing list