X-Git-Url: https://git.distorted.org.uk/~mdw/zone/blobdiff_plain/51a6847e534bc908f97f068c5ed82ed11c85ce15..b85ef4e407e433ec2b2b40c2a38957f955f827fc:/net.lisp diff --git a/net.lisp b/net.lisp index 64c796d..40882de 100644 --- a/net.lisp +++ b/net.lisp @@ -75,8 +75,7 @@ `stringify'. The START and END arguments may be used to parse out a substring." (setf str (stringify str)) - (unless end - (setf end (length str))) + (setf-default end (length str)) (let ((addr 0) (noct 0)) (loop (let* ((pos (position #\. str :start start :end end)) @@ -151,7 +150,7 @@ (defun string-ipnet (str &key (start 0) (end nil)) "Parse an IP-network from the string STR." (setf str (stringify str)) - (unless end (setf end (length str))) + (setf-default end (length str)) (let ((sl (position #\/ str :start start :end end))) (if sl (make-ipnet (parse-ipaddr (subseq str start sl))