# [PATCH] builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.

2 messages from 2010-01-30 to 2010-01-30. Participants: Thiago Farina, Stephen Boyd.
Thread: https://gitlist.dev/t/22447

## Thiago Farina, 2010-01-30 01:32

Subject: [PATCH] builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.
Message-ID: <8678db190a73997c7bd757b9d78f0fa9e8721055.1264815015.git.tfransosi@gmail.com>
URL: https://gitlist.dev/e/8678db190a73997c7bd757b9d78f0fa9e8721055.1264815015.git.tfransosi%40gmail.com

```
---
 builtin-name-rev.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin-name-rev.c b/builtin-name-rev.c
index 06a38ac..6416f72 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.6.6.1.436.gaba7d

```

## Stephen Boyd, 2010-01-30 07:53

Subject: Re: [PATCH] builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.
Message-ID: <4B63E56C.5000100@gmail.com>
URL: https://gitlist.dev/e/4B63E56C.5000100%40gmail.com
In-Reply-To: <8678db190a73997c7bd757b9d78f0fa9e8721055.1264815015.git.tfransosi@gmail.com>

```
On 01/29/2010 05:32 PM, Thiago Farina wrote:
> @@ -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));

How about sizeof(*name) instead? This way we don't have to change it 
when the type changes again.

```
