Re: [dev] [sbase] [PATCH] Fix tail -n +

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Wed, 17 Sep 2014 10:07:27 +0100

On Tue, Sep 16, 2014 at 07:14:53PM -0400, Wolfgang Corcoran-Mathe wrote:
> Fixed typo breaking + functionality in tail:
>
> diff --git a/tail.c b/tail.c
> index 59e68ca..87a08b9 100644
> --- a/tail.c
> +++ b/tail.c
> _AT_@ -60,7 +60,7 @@ dropinit(FILE *fp, const char *str, long n)
> ssize_t len;
> unsigned long i = 0;
>
> - while(i < n && ((len = agetline(&buf, &size, fp) != -1)))
> + while(i < n && ((len = agetline(&buf, &size, fp)) != -1))
> if(len && buf[len - 1] == '\n')
> i++;
> free(buf);
>
> --
> Wolfgang Corcoran-Mathe

Applied, thanks!
Received on Wed Sep 17 2014 - 11:07:27 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 17 2014 - 11:12:12 CEST