On 2/29/24 1:47 AM, Bernhard Reutner-Fischer wrote:
On Wed, 28 Feb 2024 21:29:06 -0800
Jerry D <jvdelis...@gmail.com> wrote:

The attached patch adds the error checks similar to the first patch
previously committed.

I noticed a redundancy in some defines MSGLEN and IOMSG_LEN so I
consolidated this to one define in io.h. This is just cleanup stuff.

I have added test cases for each of the places where UDTIO is done in
the library.

Regressions tested on x86_64.

OK for trunk?

I think the commit hooks will complain about several missing spaces
before open brace; See contrib/check_GNU_style.py /tmp/pr105456-3.diff

I was given the OK from git gcc-verify. Regardless if hooks fail I just fix and try again.


Would it make sense to introduce and use an internal helper like trim()?
Or would it be possible to trim the message in generate_error_common()?


I was debating this and what would be the best approach. I was not sure where to put it. I like the idea of doing in the generate_error_common. I will try that and see how it plays.

And, just for my own education, the length limitation of iomsg to 255
chars is not backed by the standard AFAICS, right? It's just our
STRERR_MAXSZ?

Yes, its what we have had for a long lone time. Once you throw an error things get very processor dependent. I found MSGLEN set to 100 and IOMSG_len to 256. Nothing magic about it.

I appreciate the comments.

--- snip ---

Jerry -

Reply via email to