mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 10:59:35 -05:00
silence compiler warnings
This commit is contained in:
parent
7d1501a44f
commit
d20b7d6bea
1 changed files with 12 additions and 17 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.156 2001/07/29 23:23:41 bwelling Exp $ */
|
||||
/* $Id: dig.c,v 1.157 2001/08/23 04:39:31 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -587,7 +587,7 @@ reorder_args(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
static isc_uint32_t
|
||||
parse_int(char *arg, const char *desc, isc_uint32_t max) {
|
||||
parse_uint(char *arg, const char *desc, isc_uint32_t max) {
|
||||
char *endp;
|
||||
isc_uint32_t tmp;
|
||||
|
||||
|
|
@ -672,10 +672,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
|||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
lookup->udpsize = (isc_uint16_t) parse_int(value, "buffer size",
|
||||
COMMSIZE);
|
||||
if (lookup->udpsize <= 0)
|
||||
lookup->udpsize = 0;
|
||||
lookup->udpsize = (isc_uint16_t) parse_uint(value,
|
||||
"buffer size", COMMSIZE);
|
||||
if (lookup->udpsize > COMMSIZE)
|
||||
lookup->udpsize = COMMSIZE;
|
||||
break;
|
||||
|
|
@ -743,9 +741,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
|||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
ndots = parse_int(value, "ndots", MAXNDOTS);
|
||||
if (ndots < 0)
|
||||
ndots = 0;
|
||||
ndots = parse_uint(value, "ndots", MAXNDOTS);
|
||||
break;
|
||||
case 's': /* nssearch */
|
||||
lookup->ns_search_only = state;
|
||||
|
|
@ -818,8 +814,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
|||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
timeout = parse_int(value, "timeout", MAXTIMEOUT);
|
||||
if (timeout <= 0)
|
||||
timeout = parse_uint(value, "timeout", MAXTIMEOUT);
|
||||
if (timeout == 0)
|
||||
timeout = 1;
|
||||
break;
|
||||
case 'r':
|
||||
|
|
@ -842,9 +838,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
|||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
lookup->retries = parse_int(value, "retries",
|
||||
lookup->retries = parse_uint(value, "retries",
|
||||
MAXTRIES);
|
||||
if (lookup->retries <= 0)
|
||||
if (lookup->retries == 0)
|
||||
lookup->retries = 1;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -971,7 +967,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
keyfile[sizeof(keyfile)-1]=0;
|
||||
return (value_from_next);
|
||||
case 'p':
|
||||
port = (in_port_t) parse_int(value, "port number", MAXPORT);
|
||||
port = (in_port_t) parse_uint(value, "port number", MAXPORT);
|
||||
return (value_from_next);
|
||||
case 't':
|
||||
*open_type_class = ISC_FALSE;
|
||||
|
|
@ -998,7 +994,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
(*lookup)->rdtype = dns_rdatatype_ixfr;
|
||||
(*lookup)->rdtypeset = ISC_TRUE;
|
||||
(*lookup)->ixfr_serial =
|
||||
parse_int(&value[5], "serial number",
|
||||
parse_uint(&value[5], "serial number",
|
||||
MAXSERIAL);
|
||||
(*lookup)->section_question = plusquest;
|
||||
(*lookup)->comments = pluscomm;
|
||||
|
|
@ -1225,7 +1221,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||
lookup->rdtype = dns_rdatatype_ixfr;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
lookup->ixfr_serial =
|
||||
parse_int(&rv[0][5],
|
||||
parse_uint(&rv[0][5],
|
||||
"serial number",
|
||||
MAXSERIAL);
|
||||
lookup->section_question = plusquest;
|
||||
|
|
@ -1424,4 +1420,3 @@ main(int argc, char **argv) {
|
|||
isc_app_finish();
|
||||
return (exitcode);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue