Changeset 977fcea in mainline for uspace/lib/c/include/ipc/icmp.h


Ignore:
Timestamp:
2011-01-14T10:11:11Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f9dd44d
Parents:
0bd2879 (diff), 6610565b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

development branch merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/icmp.h

    r0bd2879 r977fcea  
    8282/*@{*/
    8383
    84 /** Returns the ICMP code message parameter.
     84/** Return the ICMP code message parameter.
    8585 *
    86  * @param[in] call      The message call structure.
     86 * @param[in] call Message call structure.
     87 *
    8788 */
    88 #define ICMP_GET_CODE(call) \
    89         ({ \
    90                 icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \
    91                 code; \
    92         })
     89#define ICMP_GET_CODE(call)  ((icmp_code_t) IPC_GET_ARG1(call))
    9390
    94 /** Returns the ICMP link MTU message parameter.
     91/** Return the ICMP link MTU message parameter.
    9592 *
    96  * @param[in] call      The message call structure.
     93 * @param[in] call Message call structure.
     94 *
    9795 */
    98 #define ICMP_GET_MTU(call) \
    99         ({ \
    100                 icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \
    101                 mtu; \
    102         })
     96#define ICMP_GET_MTU(call)  ((icmp_param_t) IPC_GET_ARG3(call))
    10397
    104 /** Returns the pointer message parameter.
     98/** Return the pointer message parameter.
    10599 *
    106  * @param[in] call      The message call structure.
     100 * @param[in] call Message call structure.
     101 *
    107102 */
    108 #define ICMP_GET_POINTER(call) \
    109         ({ \
    110                 icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \
    111                 pointer; \
    112         })
     103#define ICMP_GET_POINTER(call)  ((icmp_param_t) IPC_GET_ARG3(call))
    113104
    114 /** Returns the size message parameter.
     105/** Return the size message parameter.
    115106 *
    116  * @param[in] call      The message call structure.
     107 * @param[in] call Message call structure.
     108 *
    117109 */
    118 #define ICMP_GET_SIZE(call) \
    119         ({ \
    120                 size_t size = (size_t) IPC_GET_ARG1(call); \
    121                 size; \
    122         })
     110#define ICMP_GET_SIZE(call)  ((size_t) IPC_GET_ARG1(call))
    123111
    124 /** Returns the timeout message parameter.
     112/** Return the timeout message parameter.
    125113 *
    126  * @param[in] call      The message call structure.
     114 * @param[in] call Message call structure.
     115 *
    127116 */
    128 #define ICMP_GET_TIMEOUT(call) \
    129         ({ \
    130                 suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \
    131                 timeout; \
    132         })
     117#define ICMP_GET_TIMEOUT(call)  ((suseconds_t) IPC_GET_ARG2(call))
    133118
    134 /** Returns the time to live message parameter.
     119/** Return the time to live message parameter.
    135120 *
    136  * @param[in] call      The message call structure.
     121 * @param[in] call Message call structure.
     122 *
    137123 */
    138 #define ICMP_GET_TTL(call) \
    139         ({ \
    140                 ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \
    141                 ttl; \
    142         })
     124#define ICMP_GET_TTL(call)  ((ip_ttl_t) IPC_GET_ARG3(call))
    143125
    144 /** Returns the type of service message parameter.
     126/** Return the type of service message parameter.
    145127 *
    146  * @param[in] call      The message call structure.
     128 * @param[in] call Message call structure.
     129 *
    147130 */
    148 #define ICMP_GET_TOS(call) \
    149         ({ \
    150                 ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \
    151                 tos; \
    152         })
     131#define ICMP_GET_TOS(call)  ((ip_tos_t) IPC_GET_ARG4(call))
    153132
    154 /** Returns the dont fragment message parameter.
     133/** Return the dont fragment message parameter.
    155134 *
    156  * @param[in] call      The message call structure.
     135 * @param[in] call Message call structure.
    157136 */
    158 #define ICMP_GET_DONT_FRAGMENT(call) \
    159         ({ \
    160                 int dont_fragment = (int) IPC_GET_ARG5(call); \
    161                 dont_fragment; \
    162         })
     137#define ICMP_GET_DONT_FRAGMENT(call)  ((int) IPC_GET_ARG5(call))
    163138
    164139/*@}*/
Note: See TracChangeset for help on using the changeset viewer.