]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
fixed minor format glitch in ntpd/ntpd.c
authorJuergen Perlinger <perlinger@ntp.org>
Fri, 9 Apr 2010 16:33:43 +0000 (12:33 -0400)
committerJuergen Perlinger <perlinger@ntp.org>
Fri, 9 Apr 2010 16:33:43 +0000 (12:33 -0400)
bk: 4bbf56e7GqnT8pOIpsbfqBYYAkwIqw

ntpd/ntpd.c

index a627061cebb3129e0266cf2113d2d15a889cd566..e5ebe978f61ee77d432a9ae4ebd42b7191c00c46 100644 (file)
@@ -357,8 +357,11 @@ change_logfile(
                        octets += strlen(syslog_fname);
                        octets += 1;    /* NUL terminator */
                        abs_fname = emalloc(octets);
+                       /* It's strictly assumed that cd_octets fits into
+                        * an 'int' without overflow or sign change!
+                        */
                        snprintf(abs_fname, octets, "%.*s%c%s",
-                                (u_int)cd_octets, curdir, DIR_SEP,
+                                (int)cd_octets, curdir, DIR_SEP,
                                 syslog_fname);
                } else
 #endif