summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/ntp_filegen.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2004-07-20 15:01:56 +0000
committerroberto <roberto@FreeBSD.org>2004-07-20 15:01:56 +0000
commit118e757284cbb8fc4f43a713e892b41504b50a5f (patch)
tree528d12dda44ebdc3ffcc38050f159ac553a69c17 /contrib/ntp/ntpd/ntp_filegen.c
parenta85d9ae25e8e8696677bc30feb6eaf7fc150e529 (diff)
downloadFreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.zip
FreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.tar.gz
Virgin import of ntpd 4.2.0
Diffstat (limited to 'contrib/ntp/ntpd/ntp_filegen.c')
-rw-r--r--contrib/ntp/ntpd/ntp_filegen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/ntp/ntpd/ntp_filegen.c b/contrib/ntp/ntpd/ntp_filegen.c
index bcf3f9c..59a1d91 100644
--- a/contrib/ntp/ntpd/ntp_filegen.c
+++ b/contrib/ntp/ntpd/ntp_filegen.c
@@ -214,7 +214,7 @@ filegen_open(
*
* If the file was open before keep the previous generation.
* This will cause output to end up in the 'wrong' file,
- * but I think this is still better than loosing output
+ * but I think this is still better than losing output
*
* ignore errors due to missing directories
*/
@@ -316,7 +316,7 @@ filegen_setup(
case FILEGEN_MONTH:
caljulian(now, &cal);
- cal.yearday -= cal.monthday - 1;
+ cal.yearday = (u_short) (cal.yearday - cal.monthday + 1);
cal.monthday = 1;
cal.hour = cal.minute = cal.second = 0;
new_gen = caltontp(&cal);
@@ -378,8 +378,8 @@ filegen_config(
gen->basename = (char*)emalloc(strlen(basename) + 1);
strcpy(gen->basename, basename);
}
- gen->type = type;
- gen->flag = flag;
+ gen->type = (u_char) type;
+ gen->flag = (u_char) flag;
/*
* make filegen use the new settings
OpenPOWER on IntegriCloud