gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 04/08: data-string: Remove some dead code in string->dat


From: gnunet
Subject: [gnunet-scheme] 04/08: data-string: Remove some dead code in string->data.
Date: Mon, 29 Aug 2022 00:15:09 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 324a4fdb4cbce45e37e362831178bf5df63541d3
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sun Aug 28 22:53:00 2022 +0200

    data-string: Remove some dead code in string->data.
    
    Size reduction: 34787 -> 34673.
---
 gnu/gnunet/data-string.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/gnu/gnunet/data-string.scm b/gnu/gnunet/data-string.scm
index e69d454..d677da7 100644
--- a/gnu/gnunet/data-string.scm
+++ b/gnu/gnunet/data-string.scm
@@ -118,17 +118,13 @@ Return the data as a bytevector on success, or raise a
 @var{enc} the encoding
 @var{out-size} size of output buffer"
       (let^ ((! rpos (string-length enc))
-            (! bits #f)
-            (! vbit #f)
-            (! ret #f)
-            (! shift #f)
             (! encoded-len (* 8 out-size))
             (! uout (make-bytevector out-size))
             (? (= 0 (string-length enc))
                (if (= 0 out-size)
                    #vu8()
                    (raise-bogus-crockford-base32hex)))
-            (<-- (vbit shift rpos ret bits)
+            (<-- (vbit shift rpos bits)
                  (if (< 0 (mod encoded-len 5))
                      ;; padding!
                      (let* ((vbit (mod encoded-len 5))
@@ -136,18 +132,16 @@ Return the data as a bytevector on success, or raise a
                             (rpos (- rpos 1))
                             (ret (get-value (string-ref enc rpos)))
                             (bits (bitwise-arithmetic-shift-right ret shift)))
-                       (values vbit shift rpos ret bits))
+                       (values vbit shift rpos bits))
                      (let* ((vbit 5)
                             (shift 0)
                             (rpos (- rpos 1))
                             (ret (get-value (string-ref enc rpos)))
                             (bits ret))
-                       (values vbit shift rpos ret bits))))
+                       (values vbit shift rpos bits))))
             (? (not (= (/ (+ encoded-len shift) 5)
                        (string-length enc)))
                (raise-bogus-crockford-base32hex))
-            (? (not ret)
-               (raise-bogus-crockford-base32hex))
             (/o/ loop
                  (wpos out-size)
                  (rpos rpos)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]