From fweimer at redhat.com Tue Jan 9 11:35:59 2024 From: fweimer at redhat.com (Florian Weimer) Date: Tue, 09 Jan 2024 11:35:59 +0100 Subject: [ldapvi] Missing 0 return value in copy_sasl_output Message-ID: <87jzoi23qo.fsf@oldenburg.str.redhat.com> 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) { From mcepl at cepl.eu Tue Jan 9 17:33:57 2024 From: mcepl at cepl.eu (=?utf-8?q?Mat=C4=9Bj_Cepl?=) Date: Tue, 09 Jan 2024 17:33:57 +0100 Subject: [ldapvi] Missing 0 return value in copy_sasl_output In-Reply-To: <87jzoi23qo.fsf@oldenburg.str.redhat.com> References: <87jzoi23qo.fsf@oldenburg.str.redhat.com> Message-ID: 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: