2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 13:57:50 +00:00
[rt33032]
    Move declaration of fudge so it's only declared if we will use it.
This commit is contained in:
Shawn Routhier
2013-04-08 11:14:20 -07:00
parent a24b9f23d0
commit cc17cbc398
2 changed files with 5 additions and 3 deletions

View File

@@ -66,6 +66,10 @@ work on other platforms. Please report any problems and suggested fixes to
- Use newer auto* tool packages and turn on RFC_3542 support on Mac OS. - Use newer auto* tool packages and turn on RFC_3542 support on Mac OS.
[ISC-Bugs #26303] [ISC-Bugs #26303]
- Remove a variable when it isn't being used due to #ifdefs to avoid
a compiler warning on Solaris using GCC.
[ISC-Bugs #33032]
Changes since 4.2.4 Changes since 4.2.4
- Correct code to calculate timing values in client to compare - Correct code to calculate timing values in client to compare

View File

@@ -526,6 +526,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
{ {
#ifdef USE_DLPI_RAW #ifdef USE_DLPI_RAW
double hh [32]; double hh [32];
int fudge;
#endif #endif
double ih [1536 / sizeof (double)]; double ih [1536 / sizeof (double)];
unsigned char *dbuf = (unsigned char *)ih; unsigned char *dbuf = (unsigned char *)ih;
@@ -533,7 +534,6 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
unsigned char dstaddr [DLPI_MAXDLADDR]; unsigned char dstaddr [DLPI_MAXDLADDR];
unsigned addrlen; unsigned addrlen;
int result; int result;
int fudge;
if (!strcmp (interface -> name, "fallback")) if (!strcmp (interface -> name, "fallback"))
return send_fallback (interface, packet, raw, return send_fallback (interface, packet, raw,
@@ -552,8 +552,6 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
fudge = dbuflen % 4; /* IP header must be word-aligned. */ fudge = dbuflen % 4; /* IP header must be word-aligned. */
memcpy (dbuf + fudge, (unsigned char *)hh, dbuflen); memcpy (dbuf + fudge, (unsigned char *)hh, dbuflen);
dbuflen += fudge; dbuflen += fudge;
#else
fudge = 0;
#endif #endif
assemble_udp_ip_header (interface, dbuf, &dbuflen, from.s_addr, assemble_udp_ip_header (interface, dbuf, &dbuflen, from.s_addr,
to -> sin_addr.s_addr, to -> sin_port, to -> sin_addr.s_addr, to -> sin_port,