{"thread":{"id":"5918","subject":"[PATCH 2/2] Make write_sha1_file_prepare() static","startedAt":"2006-10-14T10:45:45Z","lastAt":"2006-10-14T10:45:45Z","messageCount":1,"participants":["Rene Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"28757","messageId":"4530BFD9.8020809@lsrfire.ath.cx","threadId":"5918","inReplyTo":null,"subject":"[PATCH 2/2] Make write_sha1_file_prepare() static","fromName":"Rene Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2006-10-14T10:45:45Z","receivedAt":"2006-10-14T10:45:45Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"There are no callers of write_sha1_file_prepare() left outside of\nsha1_file.c, so make it static.\n\n---\n cache.h     |    6 ------\n sha1_file.c |    9 +++------\n 2 files changed, 3 insertions(+), 12 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex aa3a562..c354701 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -247,12 +247,6 @@ extern void * unpack_sha1_file(void *map\n extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size);\n extern int hash_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *sha1);\n extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1);\n-extern char *write_sha1_file_prepare(void *buf,\n-\t\t\t\t     unsigned long len,\n-\t\t\t\t     const char *type,\n-\t\t\t\t     unsigned char *sha1,\n-\t\t\t\t     unsigned char *hdr,\n-\t\t\t\t     int *hdrlen);\n \n extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);\n \ndiff --git a/sha1_file.c b/sha1_file.c\nindex 6c64ec4..d111be7 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1347,12 +1347,9 @@ void *read_object_with_reference(const u\n \t}\n }\n \n-char *write_sha1_file_prepare(void *buf,\n-\t\t\t      unsigned long len,\n-\t\t\t      const char *type,\n-\t\t\t      unsigned char *sha1,\n-\t\t\t      unsigned char *hdr,\n-\t\t\t      int *hdrlen)\n+static char *write_sha1_file_prepare(void *buf, unsigned long len,\n+                                     const char *type, unsigned char *sha1,\n+                                     unsigned char *hdr, int *hdrlen)\n {\n \tSHA_CTX c;\n \n-- \n1.4.3.rc2.gdce3\n"}]}