only set dlen if data is non-NULL - teed - A multiplex relay tee(1) daemon.
 (HTM) git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 108ea8962d23bdccac4e5cfd60dc179a1cea300a
 (DIR) parent 81543713efc69529db9bbcbd90e0b16a4481a45f
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Mon, 14 Aug 2023 15:10:09 +0200
       
       only set dlen if data is non-NULL
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         M teed.c                              |       8 +++++---
       
       1 file changed, 5 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/teed.c b/teed.c
       @@ -87,11 +87,13 @@ llist_new(llist *prev, llist *next, void *data, int len)
                }
                ret->prev = prev;
                ret->next = next;
       -        ret->dlen = len;
       -        if (data != NULL)
       +        if (data != NULL) {
                        ret->data = memdup(data, len);
       -        else
       +                ret->dlen = len;
       +        } else {
                        ret->data = NULL;
       +                ret->dlen = 0;
       +        }
        
                return ret;
        }