Sujet : Re: Fixing a sample from K&R book using cake static analyser
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 29. Jun 2024, 01:19:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5njuc$3iul8$1@dont-email.me>
References : 1 2
User-Agent : Pan/0.158 (Avdiivka; )
On Sat, 29 Jun 2024 00:02:36 -0000 (UTC), I wrote:
result = lookup(name);
if (result != NULL)
{
char * const defn_temp = strdup(defn);
if (defn_temp == NULL)
break;
Maybe replace those last two lines with
if (defn_temp == NULL)
{
result = NULL;
break;
} /*if*/