[exim-dev] [Bug 1086] wrong return value in maildir_ensure_s…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Heiko Schlittermann
Dátum:  
Címzett: exim-dev
Tárgy: [exim-dev] [Bug 1086] wrong return value in maildir_ensure_sizefile
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1086




--- Comment #3 from Heiko Schlittermann <hs+exim@???> 2011-02-21 21:41:46 ---
(In reply to comment #2)
> Git commit:
> http://git.exim.org/exim.git/commitdiff/660242ad27370c2190afb53bc50efa949b06f5f0
>
> commit 660242ad27370c2190afb53bc50efa949b06f5f0
> Author:     Phil Pennock <pdp@???>
> AuthorDate: Mon Feb 21 00:38:07 2011 -0500
> Commit:     Phil Pennock <pdp@???>
> CommitDate: Mon Feb 21 00:39:09 2011 -0500

>
>     deal with maildir quota file races.

>
>     based on patch from heiko schlittermann.
>     fixes bug 1086.
> ----
>  doc/doc-txt/ChangeLog           |    3 +++
>  src/src/transports/appendfile.c |   13 +++++++++++--
>  src/src/transports/tf_maildir.c |    2 +-
>  3 files changed, 15 insertions(+), 3 deletions(-)

>


I think, the "else" in front of the "if (maildirsize_fd == -2)"
redundant:

if (maildirsize_fd == -1) {
  ...
  return FALSE;                // here we already leave,
                               // no further "else" needed
}


[else ] if (maildirsize_fd == -2) {
...
}

Having the "else" in such case always makes me thinking, that there's a
hidden trick I do not know about :-) (But of course, it's a matter of style
and could be endlessly debated about.)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email