bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH] * gnutls.c: wgnutls_read_timeout: removed warning


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] [PATCH] * gnutls.c: wgnutls_read_timeout: removed warnings, moved fcntl stuff outside loop
Date: Mon, 14 May 2012 22:18:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Thanks for the patch!

Just some little comments, which I will amend before push it:


Tim Ruehsen <address@hidden> writes:

> From 1787847c8e285024e46c130c2bce7fd4184a69f2 Mon Sep 17 00:00:00 2001
> From: Tim Ruehsen <address@hidden>
> Date: Mon, 14 May 2012 14:52:44 +0200
> Subject: [PATCH] * gnutls.c: wgnutls_read_timeout: removed warnings, moved
>  fcntl stuff outside loop

I think it is better to keep the first line as a brief description of
the commit itself, then move the ChangeLog after the first line as:

gnutls: do not call fcntl in a loop.

* gnutls.c (wgnutls_read_timeout): removed warnings, moved fcntl stuff
outside loop.



>        flags = fcntl (fd, F_GETFL, 0);
>        if (flags < 0)
> -        return flags;
> +        return -1;

I think that if the caller doesn't really care about the result but just
check if it is an error (i.e. negative value), then the "return flags"
form could result in a smaller output.

Cheers,
Giuseppe



reply via email to

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