r16230: Fix Klocwork #861 and others. localtime and asctime
[sfrench/samba-autobuild/.git] / source3 / utils / status.c
index 05075da444fbb9fd76d26ad4cb1df65fc3ff8dfc..2566c8a50def54fbfab74844144ca8bf55a20b83 100644 (file)
@@ -155,7 +155,7 @@ static void print_share_mode(const struct share_mode_entry *e, const char *share
                        d_printf("NONE            ");
                }
 
-               d_printf(" %s   %s   %s",sharepath, fname, asctime(localtime((time_t *)&e->time.tv_sec)));
+               d_printf(" %s   %s   %s",sharepath, fname, time_to_asc((time_t *)&e->time.tv_sec));
        }
 }
 
@@ -562,7 +562,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
        d_printf("%-10s   %s   %-12s  %s",
               crec.name,procid_str_static(&crec.pid),
               crec.machine,
-              asctime(localtime(&crec.start)));
+              time_to_asc(&crec.start));
 
        return 0;
 }