diff --git a/src/cmp/cmpname.lsp b/src/cmp/cmpname.lsp index dcd321fb1..1486270da 100644 --- a/src/cmp/cmpname.lsp +++ b/src/cmp/cmpname.lsp @@ -64,16 +64,11 @@ machine." (defun search-tag (stream tag) (declare (si::c-local)) - (do* ((eof nil) - (key (concatenate 'list tag ":")) - (string key)) - (nil) - (let ((c (read-byte stream nil nil))) - (cond ((null c) (return nil)) - ((not (= c (char-code (pop string)))) - (setf string key)) - ((null string) - (return t)))))) + (loop with key = (concatenate 'list '(#\Nul) tag '(#\:)) + for string = key then (if (= c (char-code (car string))) + (or (cdr string) (return t)) + (if (zerop c) string key)) + for c = (or (read-byte stream nil nil) (return nil)))) (defun read-name (stream) (declare (si::c-local))