|
From: | Egeyar Bagcioglu |
Subject: | Re: [PATCH 3/6] ios: Check ios->handler_normalize for memory allocation error. |
Date: | Thu, 7 May 2020 23:35:51 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/7/20 6:42 PM, Jose E. Marchesi wrote:
Why would be want to check for `errno' after calling handler_normalize? The function does not return any error code.
handler_normalize returns a new handler which is a newly allocated string. Therefore, checking for errors is reasonable. Maybe we should change the signature, tough. If it wrote the new handler to a pointer we give it to, for example, we could reserve the return value for NULL for success and error_no for failure.
[Prev in Thread] | Current Thread | [Next in Thread] |