Index | Thread | Search

From:
Christian Schulte <cs@schulte.it>
Subject:
Re: Fix for vi editing mode in sftp(1) (PING)
To:
Crystal Kolipe <kolipe.c@exoticsilicon.com>
Cc:
tech@openbsd.org
Date:
Tue, 20 Jan 2026 04:10:44 +0100

Download raw body.

Thread
Am 20.01.2026 um 00:44 schrieb Crystal Kolipe:
> 
> So what Stuart suggested, whilst technically not absolutely necessary, is good
> programming practice.
> 

The manual should be the only source to decide things like this and this
only says:

el_set() ... Returns 0 on success, -1 on failure.
el_get() ... Returns 0 if successful, -1 otherwise.

The return value of el_set is not checked either. I did not take a
closer look. For consistency, if no other return values are checked, do
not add a check here. It would just confuse readers. E.g. So why does it
check the return value here only, and nowhere else? Either add all those
missing checks, or do not add a check, no one will get the reason for.
Having those checks would make it more robust against library changes in
the future, though.

[0] <https://man.openbsd.org/el_get>

-- 
Regards.