[PATCH 20/28] makes fetch_pack void

From: David Rientjes <rientjes@google.com>
Date: 2006-08-15 06:35:42
Makes fetch_pack void and cleans up function calls.

		David

Signed-off-by: David Rientjes <rientjes@google.com>
---
 fetch-pack.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index b7824db..f187636 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -414,7 +414,7 @@ static int everything_local(struct ref *
 	return retval;
 }
 
-static int fetch_pack(int fd[2], int nr_match, char **match)
+static void fetch_pack(int fd[2], int nr_match, char **match)
 {
 	struct ref *ref;
 	unsigned char sha1[20];
@@ -460,12 +460,11 @@ static int fetch_pack(int fd[2], int nr_
 		       sha1_to_hex(ref->old_sha1), ref->name);
 		ref = ref->next;
 	}
-	return 0;
 }
 
 int main(int argc, char **argv)
 {
-	int i, ret, nr_heads;
+	int i, nr_heads;
 	char *dest = NULL, **heads;
 	int fd[2];
 	pid_t pid;
@@ -516,12 +515,12 @@ int main(int argc, char **argv)
 	pid = git_connect(fd, dest, exec);
 	if (pid < 0)
 		return 1;
-	ret = fetch_pack(fd, nr_heads, heads);
+	fetch_pack(fd, nr_heads, heads);
 	close(fd[0]);
 	close(fd[1]);
 	finish_connect(pid);
 
-	if (!ret && nr_heads) {
+	if (nr_heads) {
 		/* If the heads to pull were given, we should have
 		 * consumed all of them by matching the remote.
 		 * Otherwise, 'git-fetch remote no-such-ref' would
@@ -530,9 +529,9 @@ int main(int argc, char **argv)
 		for (i = 0; i < nr_heads; i++)
 			if (heads[i] && heads[i][0]) {
 				error("no such remote ref %s", heads[i]);
-				ret = 1;
+				return 1;
 			}
 	}
 
-	return ret;
+	return 0;
 }
-- 
1.4.2.g89bb-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Aug 15 06:36:18 2006

This archive was generated by hypermail 2.1.8 : 2006-08-15 07:00:35 EST