Fix int vs time_t, convert int to time_t

This commit is contained in:
Matthew Dillon 2001-10-28 20:40:58 +00:00
parent d4474241c6
commit aa3e4732e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85641

View File

@ -63,6 +63,7 @@ char **argv;
char *inmap, *master;
int order;
int c, r;
time_t t;
yp_get_default_domain(&domainname);
@ -87,8 +88,8 @@ char **argv;
r = yp_order(domainname, inmap, &order);
if (r != 0)
errx(1, "no such map %s. Reason: %s", inmap, yperr_string(r));
printf("Map %s has order number %d. %s", inmap, order,
ctime((time_t *)&order));
t = int_to_time(order);
printf("Map %s has order number %d. %s", inmap, order, ctime(&t));
r = yp_master(domainname, inmap, &master);
if (r != 0)
errx(1, "no such map %s. Reason: %s", inmap, yperr_string(r));