* resolv/res_debug.c (latlon2ul): Add const to argument type, and use

it internally.
	(precsize_aton): Likewise.
This commit is contained in:
Roland McGrath 2002-08-08 02:01:41 +00:00
parent 78323b5b80
commit 0a463fa9da
2 changed files with 21 additions and 17 deletions

View File

@ -1,5 +1,9 @@
2002-08-07 Roland McGrath <roland@redhat.com>
* resolv/res_debug.c (latlon2ul): Add const to argument type, and use
it internally.
(precsize_aton): Likewise.
* inet/getnetgrent_r.c (endnetgrent, __getnetgrent_r): Actually call
the static symbols added in the last change (doofus is me).

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 1985
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -13,7 +13,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -29,14 +29,14 @@
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -269,7 +269,7 @@ res_pquery(const res_state statp, const u_char *msg, int len, FILE *file) {
fprintf(file, ", %s: %d",
p_section(ns_s_ar, opcode), arcount);
}
if ((!statp->pfcode) || (statp->pfcode &
if ((!statp->pfcode) || (statp->pfcode &
(RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
putc('\n',file);
}
@ -628,11 +628,11 @@ precsize_ntoa(prec)
/* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */
static u_int8_t
precsize_aton(strptr)
char **strptr;
const char **strptr;
{
unsigned int mval = 0, cmval = 0;
u_int8_t retval = 0;
char *cp;
const char *cp;
int exponent;
int mantissa;
@ -670,10 +670,10 @@ precsize_aton(strptr)
/* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */
static u_int32_t
latlon2ul(latlonstrptr,which)
char **latlonstrptr;
const char **latlonstrptr;
int *which;
{
char *cp;
const char *cp;
u_int32_t retval;
int deg = 0, min = 0, secs = 0, secsfrac = 0;
@ -811,7 +811,7 @@ loc_aton(ascii, binary)
altsign = -1;
cp++;
}
if (*cp == '+')
cp++;
@ -840,7 +840,7 @@ loc_aton(ascii, binary)
goto defaults;
siz = precsize_aton(&cp);
while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */
cp++;
@ -873,7 +873,7 @@ loc_aton(ascii, binary)
PUTLONG(latit,bcp);
PUTLONG(longit,bcp);
PUTLONG(alt,bcp);
return (16); /* size of RR in octets */
}
@ -898,7 +898,7 @@ loc_ntoa(binary, ascii)
int32_t latval, longval, altval;
u_int32_t templ;
u_int8_t sizeval, hpval, vpval, versionval;
char *sizestr, *hpstr, *vpstr;
versionval = *cp++;
@ -1012,8 +1012,8 @@ dn_count_labels(const char *name) {
}
/*
* Make dates expressed in seconds-since-Jan-1-1970 easy to read.
/*
* Make dates expressed in seconds-since-Jan-1-1970 easy to read.
* SIG records are required to be printed like this, by the Secure DNS RFC.
*/
char *
@ -1022,10 +1022,10 @@ p_secstodate (u_long secs) {
static char output[15]; /* YYYYMMDDHHMMSS and null */
time_t clock = secs;
struct tm *time;
#ifdef HAVE_TIME_R
struct tm timebuf;
time = gmtime_r(&clock, &timebuf);
#else
time = gmtime(&clock);