diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2008-12-18 17:56:51 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-12-18 09:58:40 -0800 |
commit | 0956a6db7ae3a93c7bce62c1e3a6e0795055ad9f (patch) | |
tree | f3231c0ee894852e71a06b9990c4c87deb67ce48 /diff.c | |
parent | 32738edfca29d819939196c65aecc1979ed23aa9 (diff) | |
download | git-0956a6db7ae3a93c7bce62c1e3a6e0795055ad9f.tar.gz |
Fix type-mismatch compiler warning from diff_populate_filespec()
The type of the size member of filespec is ulong, while strbuf_detach expects
a size_t pointer. This patch should fix the warning:
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1778,7 +1778,8 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only) if (strbuf_readlink(&sb, s->path, s->size)) goto err_empty; - s->data = strbuf_detach(&sb, &s->size); + s->size = sb.len; + s->data = strbuf_detach(&sb, NULL); s->should_free = 1; return 0; } |