Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-16 01:08:25 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-16 01:08:25 +0300
commit7d020f5a78a1ae7ff47d65a2adc79171c0cf9cb7 (patch)
tree5196c1aa277fe6619a24b9f5607f062f20f68b2e /convert.c
parentbce8031d9a1ff3b791f9e4c1cd1e5634faaf55fb (diff)
parent7726d360b5ba859ae2b6ceefc5d88cc518c78063 (diff)
Merge branch 'jk/size-t'
Code clean-up to use size_t/ssize_t when they are the right type. * jk/size-t: strbuf_humanise: use unsigned variables pass st.st_size as hint for strbuf_readlink() strbuf_readlink: use ssize_t strbuf: use size_t for length in intermediate variables reencode_string: use size_t for string lengths reencode_string: use st_add/st_mult helpers
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/convert.c b/convert.c
index 3ee4bc274b..ce7ea0db06 100644
--- a/convert.c
+++ b/convert.c
@@ -390,7 +390,7 @@ static int encode_to_git(const char *path, const char *src, size_t src_len,
struct strbuf *buf, const char *enc, int conv_flags)
{
char *dst;
- int dst_len;
+ size_t dst_len;
int die_on_error = conv_flags & CONV_WRITE_OBJECT;
/*
@@ -453,7 +453,7 @@ static int encode_to_git(const char *path, const char *src, size_t src_len,
*/
if (die_on_error && check_roundtrip(enc)) {
char *re_src;
- int re_src_len;
+ size_t re_src_len;
re_src = reencode_string_len(dst, dst_len,
enc, default_encoding,
@@ -481,7 +481,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len,
struct strbuf *buf, const char *enc)
{
char *dst;
- int dst_len;
+ size_t dst_len;
/*
* No encoding is specified or there is nothing to encode.