From 742c74f57cd13571eff0885ab94c8a81ca6fdb81 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 9 May 2011 04:14:09 +0000 Subject: [PATCH] Prefer (NOT (PAIR? ...)) over (NULL? ...) in unxpth.scm. --- src/runtime/unxpth.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.25.1