[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget2 | Draft: Small fixes (!505)
From: |
@rockdaboot |
Subject: |
Re: wget2 | Draft: Small fixes (!505) |
Date: |
Sat, 28 May 2022 17:30:39 +0000 |
Tim Rühsen started a new discussion on libwget/buffer_printf.c:
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963273512
> size_t wget_buffer_vprintf(wget_buffer *buf, const char *fmt, va_list args)
> {
> buf->length = 0;
> + buf->data[0] = 0;
This is unneeded, setting length to 0 is perfect. The append function starts
writing at `length` (0 in this case) and always writes a trailing 0 byte.
Except for `fmt == NULL` which we can define as 'no-op'. Maybe you could add
that to the docs, just to be explicit !?
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963273512
You're receiving this email because of your account on gitlab.com.
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505),
@rockdaboot <=
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/28
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29
- Re: wget2 | Draft: Small fixes (!505), @rockdaboot, 2022/05/29