wget-dev
[Top][All Lists]
Advanced

[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, 25 Jun 2022 11:53:55 +0000



Tim Rühsen commented on a discussion on unit-tests/test.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_1005358863

>       CHECK(!wget_memdup(NULL, 4));
>       CHECK(p = wget_memdup("xxx", 0)); xfree(p);
>       CHECK(p = wget_memdup("xxx", 4));
> -     CHECK(!memcmp(p, "xxx", 4)); xfree(p);
> +     if (p) {

Better amend the check() function to use `wget_error_printf_exit("L%d: %s\n", 
line, msg);`. Since we don't expect a failure here, it's ok to exit in case 
this happens.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_1005358863
You're receiving this email because of your account on gitlab.com.




reply via email to

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