Hi,

Gleydson Soares wrote on Mon, Mar 27, 2017 at 04:43:28PM -0300:

> instead of hard code, maybe those calls should be changed to:
> errx(1, "%s: anystring", __func__)

the usual OpenBSD idiom is

        if ((p = malloc(size)) == NULL)
                err(1, NULL);

see EXAMPLES in malloc(3), simply because the information about
whether it was malloc or calloc or whatever that failed is useless,
and the name of the function where it failed is almost never useful
either.  It's just a matter of chance when exactly memory is
exhausted.  So KISS is the usual approach in this respect.

But it's certainly not a big deal either way.

Yours,
  Ingo

Reply via email to