#include <netdb.h>
#include <stdio.h>
#include <getopt.h>
+#include <stdlib.h>
+#include <unistd.h>
-#define RFC_868_BIAS 2208988800UL
+static const int RFC_868_BIAS = 2208988800UL;
int setdate= 0;
int printdate= 0;
}
if (read(fd, (void *)&nett, 4) != 4) { /* read time from server */
close(fd);
- error_msg("%s did not send the complete time\n", host);
+ error_msg("%s did not send the complete time", host);
}
close(fd);
perror_msg_and_die("Could not set time of day");
}
if (printdate) {
- fprintf(stdout, "%s", ctime(&time));
+ printf("%s", ctime(&time));
}
return EXIT_SUCCESS;