diff options
authorJeff King <>2018-04-13 21:18:32 (GMT)
committerJunio C Hamano <>2018-04-16 05:15:03 (GMT)
commite6fa6cde5bec648f1b8fd7e3f9e5939c5093985a (patch)
parentf80bee27e3c3fc9085427945f97a2f7756500ea9 (diff)
gpg-interface: use size_t for signature buffer size
Even though our object sizes (from which these buffers would come) are typically "unsigned long", this is something we'd like to eventually fix (since it's only 32-bits even on 64-bit Windows). It makes more sense to use size_t when taking an in-memory buffer. Signed-off-by: Jeff King <> Signed-off-by: Ben Toews <> Signed-off-by: Junio C Hamano <>
2 files changed, 2 insertions, 2 deletions
diff --git a/gpg-interface.c b/gpg-interface.c
index 08de0da..ac852ad 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -101,7 +101,7 @@ void print_signature_buffer(const struct signature_check *sigc, unsigned flags)
fputs(output, stderr);
-size_t parse_signature(const char *buf, unsigned long size)
+size_t parse_signature(const char *buf, size_t size)
char *eol;
size_t len = 0;
diff --git a/gpg-interface.h b/gpg-interface.h
index 2c40a91..a5e6517 100644
--- a/gpg-interface.h
+++ b/gpg-interface.h
@@ -31,7 +31,7 @@ void signature_check_clear(struct signature_check *sigc);
* offset where the embedded detached signature begins, or the end of
* the data when there is no such signature.
-size_t parse_signature(const char *buf, unsigned long size);
+size_t parse_signature(const char *buf, size_t size);
void parse_gpg_output(struct signature_check *);