From: Joseph Sutton Date: Mon, 4 Dec 2023 01:34:37 +0000 (+1300) Subject: s4:dsdb: Use portable integer constant INT64_MIN X-Git-Tag: talloc-2.4.2~386 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6eec3ae6a650384103941996a160de9120186e9e;p=thirdparty%2Fsamba.git s4:dsdb: Use portable integer constant INT64_MIN Because it is written in hexadecimal, ‘0x8000000000000000LL’ is likely going to be represented as an ‘unsigned long long int’. Negating it actually will not change its value at all, so the unary minus achieves nothing here. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index f1f2c3d4ece..625e676165b 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -785,7 +785,7 @@ static NTTIME get_msds_user_password_expiry_time_computed(struct ldb_module *mod * * maxPwdAge: -864000000001 * to - * maxPwdAge: -9223372036854775808 (-0x8000000000000000ULL) + * maxPwdAge: -9223372036854775808 (INT64_MIN) * */ maxPwdAge = get_user_max_pwd_age(module, msg, parent, domain_dn); @@ -796,12 +796,12 @@ static NTTIME get_msds_user_password_expiry_time_computed(struct ldb_module *mod return 0x7FFFFFFFFFFFFFFFULL; } - if (maxPwdAge == -0x8000000000000000LL) { + if (maxPwdAge == INT64_MIN) { return 0x7FFFFFFFFFFFFFFFULL; } /* - * Note we already caught maxPwdAge == -0x8000000000000000ULL + * Note we already caught maxPwdAge == INT64_MIN * and pwdLastSet >= 0x7FFFFFFFFFFFFFFFULL above. * * Remember maxPwdAge is a negative number,