summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-12 22:18:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-12 22:18:23 (GMT)
commitf056cde60e7b095edf1530554a8c9528bd8b374b (patch)
tree1507f5729cc2a2718b59712b0aac3a7350c2144f /imap-send.c
parent768d0fe0dadbffe722fa4b80b2180a4fcaf1c854 (diff)
parent42c78a216e751cfa2720c8276c9e9f2b81640e6b (diff)
downloadgit-f056cde60e7b095edf1530554a8c9528bd8b374b.zip
git-f056cde60e7b095edf1530554a8c9528bd8b374b.tar.gz
git-f056cde60e7b095edf1530554a8c9528bd8b374b.tar.bz2
Merge branch 'rs/use-div-round-up'
Code cleanup. * rs/use-div-round-up: use DIV_ROUND_UP
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap-send.c b/imap-send.c
index 351e84a..b2d0b84 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -861,7 +861,7 @@ static char hexchar(unsigned int b)
return b < 10 ? '0' + b : 'a' + (b - 10);
}
-#define ENCODED_SIZE(n) (4*((n+2)/3))
+#define ENCODED_SIZE(n) (4 * DIV_ROUND_UP((n), 3))
static char *cram(const char *challenge_64, const char *user, const char *pass)
{
int i, resp_len, encoded_len, decoded_len;