From: Taylor R Campbell Date: Mon, 9 May 2011 04:14:09 +0000 (+0000) Subject: Prefer (NOT (PAIR? ...)) over (NULL? ...) in unxpth.scm. X-Git-Tag: 20110609-Gtk~5^2~8 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=742c74f57cd13571eff0885ab94c8a81ca6fdb81;p=mit-scheme.git Prefer (NOT (PAIR? ...)) over (NULL? ...) in unxpth.scm. --- diff --git a/src/runtime/unxpth.scm b/src/runtime/unxpth.scm index 6e3a55147..b5445da77 100644 --- a/src/runtime/unxpth.scm +++ b/src/runtime/unxpth.scm @@ -61,7 +61,7 @@ USA. (%make-pathname host 'UNSPECIFIC (let ((components (except-last-pair components))) - (and (not (null? components)) + (and (pair? components) (simplify-directory (if (string=? "" (car components)) (cons 'ABSOLUTE @@ -162,7 +162,7 @@ USA. (string-append (if (eq? (car directory) 'ABSOLUTE) "/" "") (let loop ((directory (cdr directory))) - (if (null? directory) + (if (not (pair? directory)) "" (string-append (unparse-directory-component (car directory)) "/" @@ -269,7 +269,7 @@ USA. (error:bad-range-argument pathname 'DIRECTORY-PATHNAME-AS-FILE)) (if (or (%pathname-name pathname) (%pathname-type pathname) - (null? (cdr directory))) + (not (pair? (cdr directory)))) ;; Root directory can't be represented as a file, because the ;; name field of a pathname must be a non-null string. We ;; could signal an error here, but instead we'll just return