git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v2 1/6] name-rev: lose unnecessary typedef
Date: Wed, 29 Aug 2012 20:50:24 -0700	[thread overview]
Message-ID: <1346298629-13730-2-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1346298629-13730-1-git-send-email-gitster@pobox.com>

Just spell it "struct rev_name"; it makes it more clear what is
going on.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/name-rev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 1b37458..8af2cfa 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -7,11 +7,11 @@
 
 #define CUTOFF_DATE_SLOP 86400 /* one day */
 
-typedef struct rev_name {
+struct rev_name {
 	const char *tip_name;
 	int generation;
 	int distance;
-} rev_name;
+};
 
 static long cutoff = LONG_MAX;
 
@@ -43,7 +43,7 @@ static void name_rev(struct commit *commit,
 	}
 
 	if (name == NULL) {
-		name = xmalloc(sizeof(rev_name));
+		name = xmalloc(sizeof(struct rev_name));
 		commit->util = name;
 		goto copy_data;
 	} else if (name->distance > distance) {
-- 
1.7.12.286.g9df01f7

  reply	other threads:[~2012-08-30  3:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30  3:50 [PATCH v2 0/6] describe --contains / name-rev --weight Junio C Hamano
2012-08-30  3:50 ` Junio C Hamano [this message]
2012-08-30  3:50 ` [PATCH v2 2/6] name_rev: clarify the logic to assign a new tip-name to a commit Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 3/6] name-rev: --weight option Junio C Hamano
2012-09-04 22:29   ` [PATCH 3.5/6] name-rev --weight: trivial optimization Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 4/6] name-rev --weight: cache the computed weight in notes Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 5/6] name-rev --weight: tests and documentation Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 6/6] describe --contains: use "name-rev --weight" Junio C Hamano

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=1346298629-13730-2-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /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).