diff options
author | Ben Peart <Ben.Peart@microsoft.com> | 2018-04-10 20:43:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-11 08:28:34 +0200 |
commit | d8579accfaea398a157a3a8ad2ca6cac25f1b999 (patch) | |
tree | 2adbc2af9439061370c3084071f8eda642c4b91a /fsmonitor.c | |
parent | fsmonitor: teach git to optionally utilize a file system monitor to speed up ... (diff) | |
download | git-d8579accfaea398a157a3a8ad2ca6cac25f1b999.tar.xz git-d8579accfaea398a157a3a8ad2ca6cac25f1b999.zip |
fsmonitor: fix incorrect buffer size when printing version number
This is a trivial bug fix for passing the incorrect size to snprintf() when
outputting the version. It should be passing the size of the destination buffer
rather than the size of the value being printed.
Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsmonitor.c')
-rw-r--r-- | fsmonitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fsmonitor.c b/fsmonitor.c index 7c1540c054..512615eef5 100644 --- a/fsmonitor.c +++ b/fsmonitor.c @@ -114,7 +114,7 @@ static int query_fsmonitor(int version, uint64_t last_update, struct strbuf *que if (!(argv[0] = core_fsmonitor)) return -1; - snprintf(ver, sizeof(version), "%d", version); + snprintf(ver, sizeof(ver), "%d", version); snprintf(date, sizeof(date), "%" PRIuMAX, (uintmax_t)last_update); argv[1] = ver; argv[2] = date; |