summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bc87ff)
raw | patch | inline | side by side (parent: 0bc87ff)
author | David Rientjes <rientjes@google.com> | |
Mon, 14 Aug 2006 20:38:14 +0000 (13:38 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 15 Aug 2006 01:41:12 +0000 (18:41 -0700) |
Removes conditional returns.
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index c923a327071875c41c60273db135e7adce25cfbd..b18f9f72d91946816ad2cb248341e4b45c745cba 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
{
ext = htonl(ext);
sz = htonl(sz);
- if ((ce_write(context, fd, &ext, 4) < 0) ||
- (ce_write(context, fd, &sz, 4) < 0))
- return -1;
- return 0;
+ return ((ce_write(context, fd, &ext, 4) < 0) ||
+ (ce_write(context, fd, &sz, 4) < 0)) ? -1 : 0;
}
static int ce_flush(SHA_CTX *context, int fd)
/* Append the SHA1 signature at the end */
SHA1_Final(write_buffer + left, context);
left += 20;
- if (write(fd, write_buffer, left) != left)
- return -1;
- return 0;
+ return (write(fd, write_buffer, left) != left) ? -1 : 0;
}
static void ce_smudge_racily_clean_entry(struct cache_entry *ce)