addr-family-ipv6.lisp (ipaddr-string): Upend the conditional.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Apr 2014 13:10:58 +0000 (14:10 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 22 Apr 2014 13:10:58 +0000 (14:10 +0100)
Put the simple fully-populated case first.

addr-family-ipv6.lisp

index 3c37907..4bec06c 100644 (file)
                     (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.