2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-02 07:15:44 +00:00

- Cast return values from getShort and getUShort for egcs.

- Fix option lookup function usage.
This commit is contained in:
Ted Lemon
1999-04-08 19:17:48 +00:00
parent bf6820e7ee
commit 2c9c029193

View File

@@ -22,7 +22,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: options.c,v 1.39 1999/04/05 19:03:59 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; "$Id: options.c,v 1.40 1999/04/08 19:17:48 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#define DHCP_OPTION_DATA #define DHCP_OPTION_DATA
@@ -702,11 +702,11 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes)
dp += 4; dp += 4;
break; break;
case 's': case 's':
sprintf (op, "%d", getShort (dp)); sprintf (op, "%d", (int)getShort (dp));
dp += 2; dp += 2;
break; break;
case 'S': case 'S':
sprintf (op, "%d", getUShort (dp)); sprintf (op, "%d", (unsigned)getUShort (dp));
dp += 2; dp += 2;
break; break;
case 'b': case 'b':
@@ -798,8 +798,7 @@ int hashed_option_get (result, universe, options, code)
if (!universe -> lookup_func) if (!universe -> lookup_func)
return 0; return 0;
oc = ((*universe -> lookup_func) oc = ((*universe -> lookup_func) (universe, options, code));
(universe, options -> universes [universe -> index], code));
if (!oc) if (!oc)
return 0; return 0;
if (!evaluate_option_cache (result, (struct packet *)0, options, oc)) if (!evaluate_option_cache (result, (struct packet *)0, options, oc))