From: Ted Lemon Date: Thu, 8 Apr 1999 19:17:48 +0000 (+0000) Subject: - Cast return values from getShort and getUShort for egcs. X-Git-Tag: V3-ALPHA-19990408~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c9c029193b9301acdb843fcb497c81413b8d165;p=thirdparty%2Fdhcp.git - Cast return values from getShort and getUShort for egcs. - Fix option lookup function usage. --- diff --git a/common/options.c b/common/options.c index 3b4520b4e..ef1587990 100644 --- a/common/options.c +++ b/common/options.c @@ -22,7 +22,7 @@ #ifndef lint 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 */ #define DHCP_OPTION_DATA @@ -702,11 +702,11 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes) dp += 4; break; case 's': - sprintf (op, "%d", getShort (dp)); + sprintf (op, "%d", (int)getShort (dp)); dp += 2; break; case 'S': - sprintf (op, "%d", getUShort (dp)); + sprintf (op, "%d", (unsigned)getUShort (dp)); dp += 2; break; case 'b': @@ -798,8 +798,7 @@ int hashed_option_get (result, universe, options, code) if (!universe -> lookup_func) return 0; - oc = ((*universe -> lookup_func) - (universe, options -> universes [universe -> index], code)); + oc = ((*universe -> lookup_func) (universe, options, code)); if (!oc) return 0; if (!evaluate_option_cache (result, (struct packet *)0, options, oc))