r5093: Make debugs less confusing when a 0 NTTIME is printed.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 29 Jan 2005 04:11:04 +0000 (04:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:22 +0000 (13:09 -0500)
Andrew Bartlett

source/lib/time.c

index fd005215a118c363a59fbce34442c8a086fa3875..e214179b6c42568c1b6bd972c8cc04d3ac39a434 100644 (file)
@@ -346,7 +346,11 @@ char *timestring(TALLOC_CTX *mem_ctx, time_t t)
 */
 const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt)
 {
-       time_t t = nt_time_to_unix(nt);
+       time_t t;
+       if (nt == 0) {
+               return "NTTIME(0)";
+       }
+       t = nt_time_to_unix(nt);
        return timestring(mem_ctx, t);
 }