VirtualBox

Changeset 35691 in vbox for trunk/src


Ignore:
Timestamp:
Jan 24, 2011 4:59:46 PM (14 years ago)
Author:
vboxsync
Message:

Main/NetIf: Another attempt to fix VBoxSVC crash when listing host interfaces with no default route (#5491)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/darwin/NetIf-darwin.cpp

    r35641 r35691  
    153153
    154154#define ROUNDUP(a) \
    155         ((a) > 0 ? (1 + (((a) - 1) | (sizeof(u_long) - 1))) : sizeof(u_long))
    156 #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
     155    (((a) & (sizeof(u_long) - 1)) ? (1 + ((a) | (sizeof(u_long) - 1))) : (a))
     156#define ADVANCE(x, n) (x += (n)->sa_len ? ROUNDUP((n)->sa_len) : sizeof(u_long))
    157157
    158158void extractAddresses(int iAddrMask, caddr_t cp, caddr_t cplim, struct sockaddr **pAddresses)
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