chiark
/
gitweb
/
~mdw
/
zone
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d53163
)
addr-family-ipv6.lisp (ipaddr-string): Upend the conditional.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 22 Apr 2014 13:10:58 +0000
(14:10 +0100)
committer
Mark 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
patch
|
blob
|
blame
|
history
diff --git
a/addr-family-ipv6.lisp
b/addr-family-ipv6.lisp
index 3c3790748918382df37085ea8c9be7786975f2a1..4bec06cf21d0649a85f97cd1507ac54263b31d15 100644
(file)
--- a/
addr-family-ipv6.lisp
+++ b/
addr-family-ipv6.lisp
@@
-167,12
+167,12
@@
(defmethod ipaddr-string ((ip ip6addr))
(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.