git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>,
	Michael Mueller <mmueller@vigilantsw.com>,
	Junio C Hamano <gitster@pobox.com>,
	Ramkumar Ramachandra <artagnon@gmail.com>
Subject: [PATCH 3/3] commit: remove commit_list_reverse()
Date: Wed, 25 Apr 2012 22:35:54 +0200	[thread overview]
Message-ID: <4F98602A.7020404@lsrfire.ath.cx> (raw)
In-Reply-To: <4F985D0A.9020100@lsrfire.ath.cx>

The function commit_list_reverse() is not used anymore; delete it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 commit.c |   15 ---------------
 commit.h |    1 -
 2 files changed, 16 deletions(-)

diff --git a/commit.c b/commit.c
index 8361acb..9ed36c7 100644
--- a/commit.c
+++ b/commit.c
@@ -361,21 +361,6 @@ struct commit_list *commit_list_insert(struct commit *item, struct commit_list *
 	return new_list;
 }
 
-void commit_list_reverse(struct commit_list **list_p)
-{
-	struct commit_list *prev = NULL, *curr = *list_p, *next;
-
-	if (!list_p)
-		return;
-	while (curr) {
-		next = curr->next;
-		curr->next = prev;
-		prev = curr;
-		curr = next;
-	}
-	*list_p = prev;
-}
-
 unsigned commit_list_count(const struct commit_list *l)
 {
 	unsigned c = 0;
diff --git a/commit.h b/commit.h
index bd17770..ccaa20b 100644
--- a/commit.h
+++ b/commit.h
@@ -59,7 +59,6 @@ unsigned commit_list_count(const struct commit_list *l);
 struct commit_list *commit_list_insert_by_date(struct commit *item,
 				    struct commit_list **list);
 void commit_list_sort_by_date(struct commit_list **list);
-void commit_list_reverse(struct commit_list **list_p);
 
 void free_commit_list(struct commit_list *list);
 
-- 
1.7.10

      parent reply	other threads:[~2012-04-25 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25  7:59 Possible segfault introduced in commit.c Michael Mueller
2012-04-25 11:14 ` Jeff King
2012-04-25 20:22   ` René Scharfe
2012-04-25 20:35     ` [PATCH 1/3] sequencer: export commit_list_append() René Scharfe
2012-04-25 22:03       ` Junio C Hamano
2012-04-30 21:07         ` René Scharfe
2012-04-25 20:35     ` [PATCH 2/3] revision: append to list instead of insert and reverse René Scharfe
2012-04-25 20:35     ` René Scharfe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F98602A.7020404@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mmueller@vigilantsw.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).