summaryrefslogtreecommitdiffstats
path: root/ntp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-06-21 18:26:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-06-21 18:26:30 +0000
commitba33011f7f1f48a626bb67447d36b447c39b2276 (patch)
treeaea5a55e5ae3afd55010f96040569e20376d5aa8 /ntp
parent2007-06-21 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadnetwork-demos-ba33011f7f1f48a626bb67447d36b447c39b2276.tar.bz2
2007-06-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* init.c: More warnings removed.
Diffstat (limited to 'ntp')
-rw-r--r--ntp/ChangeLog4
-rw-r--r--ntp/init.c20
2 files changed, 15 insertions, 9 deletions
diff --git a/ntp/ChangeLog b/ntp/ChangeLog
index 127312c..485855e 100644
--- a/ntp/ChangeLog
+++ b/ntp/ChangeLog
@@ -1,5 +1,9 @@
2007-06-21 Joel Sherrill <joel.sherrill@OARcorp.com>
+ * init.c: More warnings removed.
+
+2007-06-21 Joel Sherrill <joel.sherrill@OARcorp.com>
+
* init.c: confdefs.h should be rtems/confdefs.h
2007-06-21 Joel Sherrill <joel.sherrill@OARcorp.com>
diff --git a/ntp/init.c b/ntp/init.c
index 8d1378c..ac48775 100644
--- a/ntp/init.c
+++ b/ntp/init.c
@@ -42,6 +42,7 @@ rtems_task Init (rtems_task_argument argument);
#include <rtems/confdefs.h>
#include <stdio.h>
+#include <stdlib.h>
#include <rtems/rtems_bsdnet.h>
#include <rtems/error.h>
#include "../networkconfig.h"
@@ -69,14 +70,15 @@ Init (rtems_task_argument ignored)
sc = rtems_clock_get (RTEMS_CLOCK_GET_TOD, &now);
if (sc != RTEMS_SUCCESSFUL)
printf ("Failed to get time of day: %s\n", rtems_status_text (sc));
- printf ("The time is **** %.4d-%.2d-%.2d %.2d:%.2d:%.2d.%.3d (%d) ****\n",
- now.year,
- now.month,
- now.day,
- now.hour,
- now.minute,
- now.second,
- (now.ticks * 1000) / ticksPerSecond,
- now.ticks);
+ printf (
+ "The time is **** %.4ld-%.2ld-%.2ld %.2ld:%.2ld:%.2ld.%.3ld (%ld) ****\n",
+ (long) now.year,
+ (long) now.month,
+ (long) now.day,
+ (long) now.hour,
+ (long) now.minute,
+ (long) now.second,
+ (long) ((now.ticks * 1000) / ticksPerSecond),
+ (long) now.ticks);
exit (0);
}