dnsmasq: clean up white space in dnsmasq.init
authorEric Luehrsen <ericluehrsen@hotmail.com>
Thu, 22 Dec 2016 18:24:12 +0000 (13:24 -0500)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 5 Jan 2017 21:51:23 +0000 (22:51 +0100)
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
package/network/services/dnsmasq/files/dnsmasq.init

index 45fc29e..46607df 100644 (file)
@@ -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() {