Fix int vs time_t, convert int to time_t
This commit is contained in:
parent
044c1da2a5
commit
18ba58febf
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user