Re: [hackers] [PATCH 1/6] ed: Add optional parameter to string()

From: Страхиња Радић <contact_AT_strahinja.org>
Date: Tue, 26 Dec 2023 15:40:36 +0100

On 23/12/24 11:46AM, Rene Kita wrote:
> > + if (!from) {
> > + len = 0;
> > + t = NULL;
> > + } else {

This seems redundant. Normally, NULL shouldn't be passed, and even if it is, it
is the responsibility of the "user-programmer" (think libc functions). This is
further backed by the standard pattern of always checking for failed malloc.

Received on Tue Dec 26 2023 - 15:40:36 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 26 2023 - 15:48:33 CET