[ldapvi] Missing 0 return value in copy_sasl_output

Matěj Cepl mcepl at cepl.eu
Tue Jan 9 17:33:57 CET 2024


On Tue Jan 9, 2024 at 11:35 AM CET, Florian Weimer wrote:
> This prevents a compilation failure with current compilers.
>
> diff --git a/ldapvi.c b/ldapvi.c
> index 91b18bb30814ca81..89d231079881313d 100644
> --- a/ldapvi.c
> +++ b/ldapvi.c
> @@ -1465,7 +1465,7 @@ copy_sasl_output(FILE *out, char *sasl)
>  	int line = 0;
>  	int c;
>  
> -	if (lstat(sasl, &st) == -1) return;
> +	if (lstat(sasl, &st) == -1) return 0;
>  	if ( !(in = fopen(sasl, "r"))) syserr();
>  
>  	if (st.st_size > 0) {

The same fix I have had for 12 years old in
(https://git.sr.ht/~mcepl/ldapvi/commit/6c81195), see my devel
branch, which is on the top of the upstream master. I have
already send this couple of time to the author, but it has never
been accepted.

Best,

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl at floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Science is meaningless because it gives no answer to our
question, the only question important to us: “What shall we do
and how shall we live?”
    -- Lev Nikolaevich Tolstoy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 216 bytes
Desc: not available
URL: <http://lists.askja.de/pipermail/ldapvi/attachments/20240109/5606227d/attachment.sig>


More information about the ldapvi mailing list