[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dhcp] 02/08: dhcp: #nil -> #f
From: |
Rohan Prinja |
Subject: |
[dhcp] 02/08: dhcp: #nil -> #f |
Date: |
Mon, 15 Jun 2015 19:26:20 +0000 |
wenderen pushed a commit to branch master
in repository dhcp.
commit 7c44a86cb1514a020ac72b3b5703e5c2dbdd055b
Author: Rohan Prinja <address@hidden>
Date: Wed Jun 10 19:59:55 2015 +0530
dhcp: #nil -> #f
---
dhcp/messages.scm | 10 +++++-----
dhcp/options/base.scm | 2 +-
tests/dhcp-messages.scm | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dhcp/messages.scm b/dhcp/messages.scm
index be39b97..ff7024b 100644
--- a/dhcp/messages.scm
+++ b/dhcp/messages.scm
@@ -105,7 +105,7 @@
;; Options are represented as a fixed-length
;; vector in which each element is either a
- ;; <dhcp-option> object or #nil.
+ ;; <dhcp-option> object or #f.
(options dhcp-msg-options set-dhcp-msg-options))
;; Note: client initializes #hops to 0.
@@ -123,12 +123,12 @@
"Copy the options field OPTS from a <dhcp-message> into a
bytevector. OPTS is a vector, DST is a bytevector.
Copying starts at index IDX in DST. This function mutates DST.
-If an option is #nil, it means it does not exist, so it is
+If an option is #f, it means it does not exist, so it is
simply ignored whilst serializing."
(let loop ((i 0))
(if (< i 256)
(let* ((opt (vector-ref opts i)))
- (if (eq? #nil opt)
+ (if (eq? #f opt)
(loop (1+ i))
(let ((code i)
(len (dhcp-option-len opt))
@@ -178,7 +178,7 @@ simply ignored whilst serializing."
(let* ((code (bytevector-u8-ref src i)))
(if (or (= code 0) (code 255))
(begin
- (slot-set! res code (make-dhcp-option code 0 #nil))
+ (slot-set! res code (make-dhcp-option code 0 #f))
(helper src (+ i 1) res))
(let* ((len (bytevector-u8-ref src (+ i 1)))
(val (make-bytevector len))
@@ -186,7 +186,7 @@ simply ignored whilst serializing."
(begin
(slot-set! res code (make-dhcp-option code len val))
(helper src (+ i 2 len) res)))))))
- (helper src idx (make-vector 256 #nil)))
+ (helper src idx (make-vector 256 #f)))
;; 'Pad' and 'End' are the only zero-length options.
;; In RFC 4039, 'Rapid Commit' (also zero-length) was introduced.
diff --git a/dhcp/options/base.scm b/dhcp/options/base.scm
index 19fb41d..b0cc0d4 100644
--- a/dhcp/options/base.scm
+++ b/dhcp/options/base.scm
@@ -44,4 +44,4 @@
; bytevector is (+ len 2), and not 'len', because 'code' and
; 'len' take up one byte each. Exceptions to this are the
; 'Pad' and 'End' options, both of which are 1 byte only.
-; For such one-byte options, 'len' is 0 and 'val' is #nil.
+; For such one-byte options, 'len' is 0 and 'val' is #f.
diff --git a/tests/dhcp-messages.scm b/tests/dhcp-messages.scm
index 7395c33..2d99803 100644
--- a/tests/dhcp-messages.scm
+++ b/tests/dhcp-messages.scm
@@ -33,7 +33,7 @@
'DHCP-INIT))
(define msg
- (make-dhcpdiscover netif (make-vector 256 #nil)))
+ (make-dhcpdiscover netif (make-vector 256 #f)))
(test-begin "dhcp-messages")
- [dhcp] branch master updated (d1865d0 -> 0937fcf), Rohan Prinja, 2015/06/15
- [dhcp] 01/08: dhcp: remove trailing whitespace, Rohan Prinja, 2015/06/15
- [dhcp] 03/08: dhcp: correct copyright in tests/, Rohan Prinja, 2015/06/15
- [dhcp] 06/08: add copyright line from syscalls.scm in dhcp/interfaces, Rohan Prinja, 2015/06/15
- [dhcp] 02/08: dhcp: #nil -> #f,
Rohan Prinja <=
- [dhcp] 04/08: dhcp: more tests for (dhcp interfaces), Rohan Prinja, 2015/06/15
- [dhcp] 05/08: more exports from dhcp/options/base and dhcp/dhcp, Rohan Prinja, 2015/06/15
- [dhcp] 07/08: remove unneeded FFI code from dhcp/interfaces.scm, Rohan Prinja, 2015/06/15
- [dhcp] 08/08: fix bugs in serializer and deserializer, Rohan Prinja, 2015/06/15