VirtualBox

Changeset 51337 in vbox for trunk


Ignore:
Timestamp:
May 22, 2014 8:02:48 AM (11 years ago)
Author:
vboxsync
Message:

VirtualBoxBase.h: CheckComArgPointerValid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r47386 r51337  
    382382
    383383/**
     384 * Checks that the given pointer to an argument is valid and returns
     385 * E_POINTER + extended error info otherwise.
     386 * @param arg   Pointer argument.
     387 */
     388#define CheckComArgPointerValid(arg) \
     389    do { \
     390        if (RT_UNLIKELY(!RT_VALID_PTR(arg))) \
     391            return setError(E_POINTER, \
     392                tr("Argument %s points to invalid memory location (%p)"), \
     393                #arg, (void *)(arg)); \
     394    } while (0)
     395
     396/**
    384397 * Checks that safe array argument is not NULL and returns E_INVALIDARG +
    385398 * extended error info on failure.
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