AboutSummaryRefsLogTreeCommitDiffStats
path: root/src/mcron
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-07-24 00:26:20 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-12-28 22:19:03 +0100
commit2d6c072b47a72f9152b2d43d0ffa42f413f15713 (patch)
treefb1e9447440dbc7f4d5935ca95558b5fb27e552c /src/mcron
parent61f85be19da0e62c899e3b62da403480d881e9f9 (diff)
downloadmcron-2d6c072b47a72f9152b2d43d0ffa42f413f15713.tar.gz
mcron-2d6c072b47a72f9152b2d43d0ffa42f413f15713.tar.bz2
mcron-2d6c072b47a72f9152b2d43d0ffa42f413f15713.zip
utils: for-each-file: Use named let.
* src/mcron/utils.scm (for-each-file): Use named 'let' instead of 'do'.
Diffstat (limited to 'src/mcron')
-rw-r--r--src/mcron/utils.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mcron/utils.scm b/src/mcron/utils.scm
index 7b29971..ce2610c 100644
--- a/src/mcron/utils.scm
+++ b/src/mcron/utils.scm
@@ -92,9 +92,12 @@ General help using GNU software: <http://www.gnu.org/gethelp/>\n"
PROC must be a procedure that take one file name argument. The return value
is not specified"
(let ((dir (opendir directory)))
- (do ((file-name (readdir dir) (readdir dir)))
- ((eof-object? file-name) (closedir dir))
- (proc file-name))))
+ (let loop ((file-name (readdir dir)))
+ (if (eof-object? file-name)
+ (closedir dir)
+ (begin
+ (proc file-name)
+ (loop (readdir dir)))))))
(define (process-update-request fdes-list)
"Read a user name from the socket, dealing with the /etc/crontab special