diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2009-05-12 09:05:55 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2009-05-12 09:05:55 +0000 |
commit | a000053494e580dfdbfa2d679b9a413f0391fafa (patch) | |
tree | 37f06ba94b01403ba26214b665492d4b58130c50 /distrib | |
parent | 3c823f331ff38a73018229d5c70831de6c965e9d (diff) |
Cleanup and shave some bytes in hextodec()
ok krw@, "If that works, commit it" deraadt@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sub | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 30d1cbb75fc..7eaab5b62f9 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.544 2009/05/09 22:41:01 martynas Exp $ +# $OpenBSD: install.sub,v 1.545 2009/05/12 09:05:54 halex Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -694,10 +694,10 @@ __EOT hextodec() { local _d _b - for _b in $(echo $1 | sed -e 's/0x\(..\)\(..\)\(..\)\(..\)/\1 \2 \3 \4/'); do - _d=${_d}.$((16#$_b)) + for _b in $(echo ${1#0x} | sed 's/\(..\)/\1 /g'); do + _d=$_d.$((0x$_b)) done - echo $_d | sed -e 's/^\.//' + echo ${_d#.} } v4_config() { |