зеркало из https://github.com/microsoft/git.git
read-cache.c cleanup
Removes conditional returns. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
0bc87ffb6c
Коммит
968a1d65f4
10
read-cache.c
10
read-cache.c
|
@ -880,10 +880,8 @@ static int write_index_ext_header(SHA_CTX *context, int fd,
|
||||||
{
|
{
|
||||||
ext = htonl(ext);
|
ext = htonl(ext);
|
||||||
sz = htonl(sz);
|
sz = htonl(sz);
|
||||||
if ((ce_write(context, fd, &ext, 4) < 0) ||
|
return ((ce_write(context, fd, &ext, 4) < 0) ||
|
||||||
(ce_write(context, fd, &sz, 4) < 0))
|
(ce_write(context, fd, &sz, 4) < 0)) ? -1 : 0;
|
||||||
return -1;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ce_flush(SHA_CTX *context, int fd)
|
static int ce_flush(SHA_CTX *context, int fd)
|
||||||
|
@ -905,9 +903,7 @@ static int ce_flush(SHA_CTX *context, int fd)
|
||||||
/* Append the SHA1 signature at the end */
|
/* Append the SHA1 signature at the end */
|
||||||
SHA1_Final(write_buffer + left, context);
|
SHA1_Final(write_buffer + left, context);
|
||||||
left += 20;
|
left += 20;
|
||||||
if (write(fd, write_buffer, left) != left)
|
return (write(fd, write_buffer, left) != left) ? -1 : 0;
|
||||||
return -1;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ce_smudge_racily_clean_entry(struct cache_entry *ce)
|
static void ce_smudge_racily_clean_entry(struct cache_entry *ce)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче