git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* remove duplicate code and not needed break statement
@ 2010-07-18 17:49 Ralf Thielow
  2010-07-18 17:57 ` Valeo de Vries
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ralf Thielow @ 2010-07-18 17:49 UTC (permalink / raw)
  To: git

Remove duplicate code and not needed break statement.

On switch statements you can use multiple cases for one
statement and on a goto statement you not need a break.

>From 5b3e7c8f8b81a295b5c58534be250f5a818ccc64 Mon Sep 17 00:00:00 2001
From: Ralf Thielow <ralf.thielow@googlemail.com>
Date: Sun, 18 Jul 2010 18:48:58 +0200
Subject: [PATCH] remove duplicate code and not needed break statement

---
 server-info.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/server-info.c b/server-info.c
index 4098ca2..9ec744e 100644
--- a/server-info.c
+++ b/server-info.c
@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
 				goto out_stale;
 			break;
 		case 'D': /* we used to emit D but that was misguided. */
-			goto out_stale;
-			break;
 		case 'T': /* we used to emit T but nobody uses it. */
 			goto out_stale;
-			break;
 		default:
 			error("unrecognized: %s", line);
 			break;
-- 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-07-19 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-18 17:49 remove duplicate code and not needed break statement Ralf Thielow
2010-07-18 17:57 ` Valeo de Vries
     [not found]   ` <AANLkTimuIBe2mvCH15D0RCzlgKTxhHEoX8KEsqiTJgO0@mail.gmail.com>
2010-07-18 18:19     ` Ralf Thielow
2010-07-18 18:29   ` Ralf Thielow
2010-07-18 18:47 ` Jonathan Nieder
2010-07-18 18:56   ` Ralf Thielow
2010-07-19 15:43 ` Erik Faye-Lund
2010-07-19 16:06   ` Jonathan Nieder
2010-07-19 16:26     ` Ralf Thielow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).