summaryrefslogtreecommitdiff
path: root/csum-file.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-11-05 03:54:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-05 20:55:33 (GMT)
commitec640ed1cf1d62730555705ec18b785c43e81f62 (patch)
treeec799e9b53c22d88fc6aa8b7eb877fce29d01f3a /csum-file.h
parent9ef4272bea94b022aa84372c06e211bccd5f8a54 (diff)
downloadgit-ec640ed1cf1d62730555705ec18b785c43e81f62.zip
git-ec640ed1cf1d62730555705ec18b785c43e81f62.tar.gz
git-ec640ed1cf1d62730555705ec18b785c43e81f62.tar.bz2
remove dead code from the csum-file interface
The provided name argument is always constant and valid in every caller's context, so no need to have an array of PATH_MAX chars to copy it into when a simple pointer will do. Unfortunately that means getting rid of wascally wabbits too. The 'error' field is also unused. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.h')
-rw-r--r--csum-file.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/csum-file.h b/csum-file.h
index a38cc3a..1af7656 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -5,12 +5,12 @@ struct progress;
/* A SHA1-protected file */
struct sha1file {
- int fd, error;
- unsigned int offset, namelen;
+ int fd;
+ unsigned int offset;
SHA_CTX ctx;
off_t total;
struct progress *tp;
- char name[PATH_MAX];
+ const char *name;
int do_crc;
uint32_t crc32;
unsigned char buffer[8192];