mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib: update null_nttime() of -1: -1 is NTTIME_FREEZE
NTTIME_FREEZE is not a nil sentinel value, instead it implies special, yet unimplemented semantics. Callers must deal with those values specifically and null_nttime() must not lie about their nature. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e2740e4868
commit
5503bde93b
@ -35,7 +35,7 @@ static bool test_null_time(struct torture_context *tctx)
|
||||
static bool test_null_nttime(struct torture_context *tctx)
|
||||
{
|
||||
torture_assert(tctx, null_nttime(0), "0");
|
||||
torture_assert(tctx, null_nttime(NTTIME_FREEZE), "-1");
|
||||
torture_assert(tctx, !null_nttime(NTTIME_FREEZE), "-1");
|
||||
torture_assert(tctx, !null_nttime(42), "42");
|
||||
return true;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ check if it's a null NTTIME
|
||||
**/
|
||||
_PUBLIC_ bool null_nttime(NTTIME t)
|
||||
{
|
||||
return t == 0 || t == (NTTIME)-1;
|
||||
return t == 0;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user