Merge branch 'rs/receive-pack-use-labs'

* rs/receive-pack-use-labs:
  use labs() for variables of type long instead of abs()
This commit is contained in:
Junio C Hamano 2014-12-05 11:42:53 -08:00
commit 0e0252b755

View File

@ -431,7 +431,7 @@ static const char *check_nonce(const char *buf, size_t len)
nonce_stamp_slop = (long)ostamp - (long)stamp;
if (nonce_stamp_slop_limit &&
abs(nonce_stamp_slop) <= nonce_stamp_slop_limit) {
labs(nonce_stamp_slop) <= nonce_stamp_slop_limit) {
/*
* Pretend as if the received nonce (which passes the
* HMAC check, so it is not a forged by third-party)