git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mailsplit.c: remove dead code

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 12, 2014, 22:58 UTC
Message-ID
<20140812225826.GC24621@google.com>
In-Reply-To
<1407878487-23530-1-git-send-email-stefanbeller@gmail.com>
Stefan Beller wrote:
> This was found by coverity. (Id: 290001)
[...]
Show 5 quoted lines
> Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
> Helped-by: René Scharfe <l.s.r@web.de>
> ---
>  builtin/mailsplit.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)

The idea is to simplify error handling (removing cleanup of the 'output' var) by making it more obvious that there is only one kind of error, right?

For what it's worth, it looks good to me (and much clearer than the last version). It's always possible to reintroduce goto-based error handling later if another kind of error is introduced, and in the meantime this is simpler and does not change behavior.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.
Previous: Matthieu MoyNext: Jeff King
Message 8 of 9 in “mailsplit.c: remove dead code”
  1. mailsplit.c: remove dead codeStefan Beller, Aug 11, 2014
  2. René ScharfeAug 12, 2014
  3. mailsplit.c: remove dead codeStefan Beller, Aug 12, 2014
  4. Matthieu MoyAug 12, 2014
  5. Junio C HamanoAug 12, 2014
  6. Junio C HamanoAug 12, 2014
  7. Matthieu MoyAug 12, 2014
  8. Jonathan NiederAug 12, 2014
  9. Jeff KingAug 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.