[PATCH] mailsplit.c: remove dead code

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

 



This was found by coverity. (Id: 290001)

the variable 'output' is only assigned to a value inequal to NUL,
after all gotos to the corrupt label.
Therefore we can conclude the two removed lines are actually dead code.

Signed-off-by: Stefan Beller <stefanbeller@xxxxxxxxx>
---
 builtin/mailsplit.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 06296d4..b499014 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -93,8 +93,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
 	return status;
 
  corrupt:
-	if (output)
-		fclose(output);
 	unlink(name);
 	fprintf(stderr, "corrupt mailbox\n");
 	exit(1);
-- 
2.1.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]