base-files: ipcalc.sh: fix awk regex syntax
authorLeon M. George <leon@georgemail.eu>
Fri, 14 Oct 2022 12:09:34 +0000 (14:09 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 7 Feb 2023 20:05:58 +0000 (21:05 +0100)
It worked fine before but gawk warns about it.

Signed-off-by: Leon M. George <leon@georgemail.eu>
package/base-files/files/bin/ipcalc.sh

index 99269fff066f99176ad5802d7005eb53e6e29fca..56854b4104105d1ecbebff93e16895e6124823e1 100755 (executable)
@@ -11,7 +11,7 @@ function bitcount(c) {
 
 function ip2int(ip) {
        ret=0
-       n=split(ip,a,"\.")
+       n=split(ip,a,"\\.")
        for (x=1;x<=n;x++)
                ret=or(lshift(ret,8),a[x])
        return ret