From: Mark Wooding Date: Tue, 22 Apr 2014 13:10:58 +0000 (+0100) Subject: addr-family-ipv6.lisp (ipaddr-string): Upend the conditional. X-Git-Url: https://git.distorted.org.uk/~mdw/zone/commitdiff_plain/15db92449a34a2fede25d8ee3db38ab5cc206193 addr-family-ipv6.lisp (ipaddr-string): Upend the conditional. Put the simple fully-populated case first. --- diff --git a/addr-family-ipv6.lisp b/addr-family-ipv6.lisp index 3c37907..4bec06c 100644 --- a/addr-family-ipv6.lisp +++ b/addr-family-ipv6.lisp @@ -167,12 +167,12 @@ (incf i) (when (>= i end) (return)) (write-char #\: out)))))) - (cond (best-start + (cond ((null best-start) + (chunk 0 8)) + (t (chunk 0 best-start) (write-string "::" out) - (chunk (+ best-start best-length) 8)) - (t - (chunk 0 8))))))) + (chunk (+ best-start best-length) 8))))))) ;;;-------------------------------------------------------------------------- ;;; IPv6 networks.