Merge branch 'rs/use-div-round-up'

Code cleanup.

* rs/use-div-round-up:
  use DIV_ROUND_UP
This commit is contained in:
Junio C Hamano
2017-07-12 15:18:23 -07:00
9 changed files with 14 additions and 15 deletions

View File

@ -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;