bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#75911: maint: fix s390 buffer flushes


From: Eduard Stefes
Subject: bug#75911: maint: fix s390 buffer flushes
Date: Wed, 29 Jan 2025 14:17:27 +0000

Hi,

Thx for the review. I'll resend with the corrections. 

On Tue, 2025-01-28 at 15:44 +0100, Ilya Leoshkevich wrote:
> On Tue, 2025-01-28 at 15:37 +0100, Eduard Stefes wrote:
> 
> LGTM, but I have several stylistic comments.
> 
> > Problem reported by Nick Rosbrook in:
> > https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/2083700
> > 
> > align the behavior of dfltcc_inflate to do the same as gzip_inflate
> > when it hits a premature EOF
> 
> Looking at the style of other gzip commits:
> I would capitalize "Align" and add a dot at the end.
> 
> > ---
> >  dfltcc.c    | 7 ++++++-
> >  tests/hufts | 6 ++++--
> >  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> 
> > diff --git a/dfltcc.c b/dfltcc.c
> > index 811c1f8..07726cb 100644
> > --- a/dfltcc.c
> > +++ b/dfltcc.c
> > @@ -18,6 +18,7 @@
> >  #include <config.h>
> >  
> >  #include <stdlib.h>
> > +#include <errno.h>
> >  
> >  #ifdef HAVE_SYS_SDT_H
> >  # include <sys/sdt.h>
> > @@ -437,7 +438,11 @@ dfltcc_inflate ()
> >            if (fill_inbuf (1) == EOF)
> >              {
> >                /* Premature EOF.  */
> > -              return 2;
> > +              flush_outbuf();
> 
> Here and below: there should be a space before ().
> 
> > +              errno = 0;
> > +              read_error();
> > +              /* Premature EOF.  */
> 
> Duplicate comment, I would drop this copy.
> 
> > +              __builtin_unreachable();
> >              }
> >            inptr = 0;
> >          }
> 
> [...]
> 
> Best regards,
> Ilya

-- 
Eduard Stefes <Eduard.Stefes@ibm.com>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]