aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-07-10 02:57:51 -0400
committerJunio C Hamano <junkio@cox.net>2006-07-10 00:47:13 -0700
commita9486b02ec7e03d17317fe538b0d06ca04379f23 (patch)
treeb5b4ac5d1caba95de4f2571b46ac600f43b48fce /sha1_file.c
parent82e5a82fd73edb80a841f5fab1660e14b9b8f3ad (diff)
downloadgit-a9486b02ec7e03d17317fe538b0d06ca04379f23.tar.gz
git-a9486b02ec7e03d17317fe538b0d06ca04379f23.tar.xz
Avoid C99 comments, use old-style C comments instead.
This doesn't make the code uglier or harder to read, yet it makes the code more portable. This also simplifies checking for other potential incompatibilities. "gcc -std=c89 -pedantic" can flag many incompatible constructs as warnings, but C99 comments will cause it to emit an error. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index f7bb3a1c5..459430a56 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -453,7 +453,7 @@ int use_packed_git(struct packed_git *p)
{
if (!p->pack_size) {
struct stat st;
- // We created the struct before we had the pack
+ /* We created the struct before we had the pack */
stat(p->pack_name, &st);
if (!S_ISREG(st.st_mode))
die("packfile %s not a regular file", p->pack_name);
@@ -1504,7 +1504,7 @@ static void *repack_object(const unsigned char *sha1, unsigned long *objsize)
int hdrlen;
void *buf;
- // need to unpack and recompress it by itself
+ /* need to unpack and recompress it by itself */
unpacked = read_packed_sha1(sha1, type, &len);
hdrlen = sprintf(hdr, "%s %lu", type, len) + 1;