mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
80. [cleanup] <isc/print.h> does not need <stdio.h> or <stdlib.h>.
(and now dns/ttl.c needs it since it was taken out of isc/print.h)
This commit is contained in:
parent
8fedfa7b45
commit
7ce81e15fa
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
|||||||
|
80. [cleanup] <isc/print.h> does not need <stdio.h> or <stdlib.h>.
|
||||||
|
|
||||||
79. [cleanup] <dns/callbacks.h> does not need <stdio.h>.
|
79. [cleanup] <dns/callbacks.h> does not need <stdio.h>.
|
||||||
|
|
||||||
78. [cleanup] lwres_conftest renamed to lwresconf_test for
|
78. [cleanup] lwres_conftest renamed to lwresconf_test for
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <isc/assertions.h>
|
#include <isc/assertions.h>
|
||||||
@ -55,6 +56,7 @@ ttlfmt(unsigned int t, char *s, isc_boolean_t verbose,
|
|||||||
t == 1 ? "" : "s");
|
t == 1 ? "" : "s");
|
||||||
else
|
else
|
||||||
len = snprintf(tmp, sizeof(tmp), "%u%c", t, s[0]);
|
len = snprintf(tmp, sizeof(tmp), "%u%c", t, s[0]);
|
||||||
|
|
||||||
INSIST(len + 1 <= sizeof tmp);
|
INSIST(len + 1 <= sizeof tmp);
|
||||||
isc_buffer_available(target, ®ion);
|
isc_buffer_available(target, ®ion);
|
||||||
if (len > region.length)
|
if (len > region.length)
|
||||||
@ -67,9 +69,7 @@ ttlfmt(unsigned int t, char *s, isc_boolean_t verbose,
|
|||||||
/* Derived from bind8 ns_format_ttl(). */
|
/* Derived from bind8 ns_format_ttl(). */
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_ttl_totext(isc_uint32_t src, isc_boolean_t verbose,
|
dns_ttl_totext(isc_uint32_t src, isc_boolean_t verbose, isc_buffer_t *target) {
|
||||||
isc_buffer_t *target)
|
|
||||||
{
|
|
||||||
unsigned secs, mins, hours, days, weeks, x;
|
unsigned secs, mins, hours, days, weeks, x;
|
||||||
|
|
||||||
secs = src % 60; src /= 60;
|
secs = src % 60; src /= 60;
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
*** Imports
|
*** Imports
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user