From: Ralf Thielow Date: Mon, 19 Jul 2010 16:26:12 GMT Subject: Re: remove duplicate code and not needed break statement Message-ID: In-Reply-To: <20100719160632.GA17526@burratino> From 5b3e7c8f8b81a295b5c58534be250f5a818ccc64 Mon Sep 17 00:00:00 2001 From: Ralf Thielow Date: Sun, 18 Jul 2010 18:48:58 +0200 Subject: [PATCH] update-server-info: Shorten read_pack_info_file() The correct responses to a D and a T line in .git/objects/info/packs are the same, so combine their case arms. In both cases we already ‘goto’ out of the switch so while at it, remove a redundant ‘break’ to avoid yet another line of code. Signed-off-by: Ralf Thielow Reviewed-by: Jonathan Nieder gmail.com> --- 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; -- 1.7.0.4