2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Megacommit of many files.

Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

The macro DE_CONST is used to deal with a handful of very special
places where something is qualified as const but really needs to have
its const qualifier removed.

rdata.c now defines macros for the prototypes of the basic rdata functions,
and all of the lib/dns/rdata/**/*.c files now use them.

Some minor integer-compatibility issues.  (IE, ~0x03 is a signed int,
so assigning it to an unsigned int should use a cast.  The type of an
enum member is int, so there are some conversion issues there, too.)

A pointers-to-function should not be cast to a pointer-to-object.

Variables should not be named for C reserved identifiers.

One or two set-but-not-used variables removed.

Minor other ISC style cleanups.
This commit is contained in:
David Lawrence
2000-06-01 18:26:56 +00:00
parent 8612a0d515
commit 6d12fdf966
76 changed files with 886 additions and 1340 deletions

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: callbacks.c,v 1.7 2000/05/08 14:34:27 tale Exp $ */
/* $Id: callbacks.c,v 1.8 2000/06/01 18:25:26 tale Exp $ */
#include <config.h>
@@ -24,14 +24,17 @@
#include <dns/callbacks.h>
#include <dns/log.h>
static void stdio_error_warn_callback(dns_rdatacallbacks_t *, char *, ...);
static void
stdio_error_warn_callback(dns_rdatacallbacks_t *, const char *, ...);
/*
* Private
*/
static void
stdio_error_warn_callback(dns_rdatacallbacks_t *callbacks, char *fmt, ...) {
stdio_error_warn_callback(dns_rdatacallbacks_t *callbacks,
const char *fmt, ...)
{
va_list ap;
UNUSED(callbacks);
@@ -43,7 +46,7 @@ stdio_error_warn_callback(dns_rdatacallbacks_t *callbacks, char *fmt, ...) {
}
static void
isclog_error_callback(dns_rdatacallbacks_t *callbacks, char *fmt, ...) {
isclog_error_callback(dns_rdatacallbacks_t *callbacks, const char *fmt, ...) {
va_list ap;
UNUSED(callbacks);
@@ -56,7 +59,7 @@ isclog_error_callback(dns_rdatacallbacks_t *callbacks, char *fmt, ...) {
}
static void
isclog_warn_callback(dns_rdatacallbacks_t *callbacks, char *fmt, ...) {
isclog_warn_callback(dns_rdatacallbacks_t *callbacks, const char *fmt, ...) {
va_list ap;
UNUSED(callbacks);