VirtualBox

Changeset 94977 in vbox


Ignore:
Timestamp:
May 10, 2022 9:45:57 AM (3 years ago)
Author:
vboxsync
Message:

Devices/Network/lwip-new/ipv4/ip_frag.c: Missing paranthesis around ternary operator in macro, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv4/ip_frag.c

    r50474 r94977  
    100100#endif
    101101
     102#ifndef VBOX
    102103#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB)  \
    103104  (ip_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \
    104105   ip_addr_cmp(&(iphdrA)->dest, &(iphdrB)->dest) && \
    105106   IPH_ID(iphdrA) == IPH_ID(iphdrB)) ? 1 : 0
     107#else
     108/*
     109 * Put parantheses around the whole construct so the ternary operator works
     110 * as anticipated.
     111 */
     112#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB)  \
     113  ((ip_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \
     114    ip_addr_cmp(&(iphdrA)->dest, &(iphdrB)->dest) && \
     115    IPH_ID(iphdrA) == IPH_ID(iphdrB)) ? 1 : 0)
     116#endif
    106117
    107118/* global variables */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette